summaryrefslogtreecommitdiff
path: root/depends/md5/CMakeLists.txt
diff options
context:
space:
mode:
authoreroen2012-10-24 12:20:26 +0200
committereroen2012-10-24 12:43:40 +0200
commit3ecda6dbba4f8f8de89e7e1efd8ee40d00e5bb87 (patch)
treee285915882a90eab52db0ac9128bc1a7c3126a7c /depends/md5/CMakeLists.txt
parentd9cd427121d0edd2fb4f1983fe30ac629a03c2f7 (diff)
downloaddfhack-to-upstream.tar.gz
dfhack-to-upstream.tar.bz2
dfhack-to-upstream.tar.xz
Compile static dependency libraries as PIC.to-upstream
Otherwise, we get position dependent textrels in the shared libraries that link against them, which is slightly bad for performance (and very bad for portability). Cross-platform support for handling this was added in cmake 2.8.9.
Diffstat (limited to 'depends/md5/CMakeLists.txt')
-rw-r--r--depends/md5/CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/depends/md5/CMakeLists.txt b/depends/md5/CMakeLists.txt
index 69e0cf0b..df14e3c5 100644
--- a/depends/md5/CMakeLists.txt
+++ b/depends/md5/CMakeLists.txt
@@ -1,3 +1,4 @@
project(dfhack-md5)
ADD_LIBRARY(dfhack-md5 STATIC EXCLUDE_FROM_ALL md5.cpp md5wrapper.cpp)
-IDE_FOLDER(dfhack-md5 "Depends") \ No newline at end of file
+set_target_properties(dfhack-md5 PROPERTIES POSITION_INDEPENDENT_CODE True)
+IDE_FOLDER(dfhack-md5 "Depends")