summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-07-15 17:45:40 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-07-15 17:45:40 -0700
commitf474ac349069ad5c07050a54fbd0a10262acd23c (patch)
tree7223935e84e1da14101f3ebbe9a8419c8b2d3e9f
parent4b172b6be03de83157d3e2aab07efe40de8ee736 (diff)
Set POSITION_INDEPENDENT_CODE ON for static library.
See discussion in #39.
-rw-r--r--src/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index eee9316..b40c1ac 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -88,7 +88,8 @@ set_target_properties(${LIBRARY} PROPERTIES
SOVERSION ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}
VERSION ${PROJECT_VERSION})
set_target_properties(${STATICLIBRARY} PROPERTIES
- COMPILE_FLAGS -DCMARK_STATIC_DEFINE)
+ COMPILE_FLAGS -DCMARK_STATIC_DEFINE
+ POSITION_INDEPENDENT_CODE ON)
if (MSVC)
set_target_properties(${STATICLIBRARY} PROPERTIES