Link with -fPIC when using Clang.

Remove the need for a few workarounds by handling this in just one place.
This commit is contained in:
leper
2019-01-09 00:55:19 +01:00
parent 7c68e09d77
commit 542711f862
4 changed files with 4 additions and 26 deletions

View File

@ -21,15 +21,3 @@ SET(SQUISH_SRCS
simd_ve.h)
ADD_LIBRARY(squish STATIC ${SQUISH_SRCS})
IF(NOT WIN32)
IF("${CMAKE_CXX_COMPILER}" MATCHES "clang(\\+\\+)?$" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
SET(CMAKE_COMPILER_IS_CLANGXX 1)
ENDIF()
IF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
SET_TARGET_PROPERTIES(squish PROPERTIES COMPILE_FLAGS -fPIC)
ENDIF(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
ENDIF(NOT WIN32)