diff options
author | Brad King <brad.king@kitware.com> | 2019-01-24 14:52:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-24 14:52:25 (GMT) |
commit | d67ce0a61e6a4c8b639cb19f575b4f0a5b2d033f (patch) | |
tree | bbc71ae1f140a3f99bd7398829c5d9ee3f1d410c /Source/kwsys/CMakeLists.txt | |
parent | 1d02491950b0aa05d2053e7fa32b39dca31e537b (diff) | |
parent | bee32e96b392ff4e0f2baf8fdc831a9e5240c7d9 (diff) | |
download | CMake-d67ce0a61e6a4c8b639cb19f575b4f0a5b2d033f.zip CMake-d67ce0a61e6a4c8b639cb19f575b4f0a5b2d033f.tar.gz CMake-d67ce0a61e6a4c8b639cb19f575b4f0a5b2d033f.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2019-01-24 (b9dd1636)
Diffstat (limited to 'Source/kwsys/CMakeLists.txt')
-rw-r--r-- | Source/kwsys/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt index a2fcc16..b33aa80 100644 --- a/Source/kwsys/CMakeLists.txt +++ b/Source/kwsys/CMakeLists.txt @@ -454,6 +454,10 @@ ELSE() SET(KWSYS_LIBRARY_TYPE STATIC) ENDIF() +if(NOT DEFINED KWSYS_BUILD_PIC) + set(KWSYS_BUILD_PIC 0) +endif() + #----------------------------------------------------------------------------- # Configure some implementation details. @@ -870,7 +874,7 @@ IF(KWSYS_C_SRCS OR KWSYS_CXX_SRCS) SET(KWSYS_LINK_DEPENDENCY INTERFACE) ADD_LIBRARY(${KWSYS_TARGET_OBJECT} OBJECT ${KWSYS_C_SRCS} ${KWSYS_CXX_SRCS}) - IF(KWSYS_BUILD_SHARED) + IF(KWSYS_BUILD_SHARED OR KWSYS_BUILD_PIC) SET_PROPERTY(TARGET ${KWSYS_TARGET_OBJECT} PROPERTY POSITION_INDEPENDENT_CODE TRUE) ENDIF() @@ -965,7 +969,7 @@ IF(KWSYS_ENABLE_C AND KWSYS_C_SRCS) ${KWSYS_TARGET_C_INTERFACE} ${KWSYS_TARGET_C_LINK}) SET(KWSYS_LINK_DEPENDENCY INTERFACE) ADD_LIBRARY(${KWSYS_TARGET_C_OBJECT} OBJECT ${KWSYS_C_SRCS}) - IF(KWSYS_BUILD_SHARED) + IF(KWSYS_BUILD_SHARED OR KWSYS_BUILD_PIC) SET_PROPERTY(TARGET ${KWSYS_TARGET_C_OBJECT} PROPERTY POSITION_INDEPENDENT_CODE TRUE) ENDIF() |