Merge pull request #292 from leper/clang_linking
Fix linking with Clang and clean up some linking directive
This commit is contained in:
commit
b45560cfc4
@ -43,10 +43,12 @@ IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
IF(CMAKE_BUILD_TYPE STREQUAL "debug")
|
||||
ADD_DEFINITIONS(-D_DEBUG)
|
||||
ENDIF(CMAKE_BUILD_TYPE STREQUAL "debug")
|
||||
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
ENDIF()
|
||||
|
||||
IF(MSVC)
|
||||
# @@ Some of these might only be available in VC8.
|
||||
# Code generation flags.
|
||||
|
@ -15,9 +15,3 @@ SET(BC6H_SRCS
|
||||
|
||||
ADD_LIBRARY(bc6h STATIC ${BC6H_SRCS})
|
||||
TARGET_LINK_LIBRARIES(bc6h nvcore nvmath)
|
||||
|
||||
IF(NOT WIN32)
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET_TARGET_PROPERTIES(bc6h PROPERTIES COMPILE_FLAGS -fPIC)
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
ENDIF(NOT WIN32)
|
||||
|
@ -23,11 +23,3 @@ SET(BC7_SRCS
|
||||
|
||||
ADD_LIBRARY(bc7 STATIC ${BC7_SRCS})
|
||||
TARGET_LINK_LIBRARIES(bc7 nvcore nvmath)
|
||||
|
||||
TARGET_LINK_LIBRARIES(bc7 nvmath)
|
||||
|
||||
IF(NOT WIN32)
|
||||
IF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET_TARGET_PROPERTIES(bc7 PROPERTIES COMPILE_FLAGS -fPIC)
|
||||
ENDIF(CMAKE_COMPILER_IS_GNUCXX)
|
||||
ENDIF(NOT WIN32)
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user