summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreroen2012-10-21 11:40:50 +0200
committereroen2012-10-24 13:01:42 +0200
commit726079e7fec6d38615e0bf7f48d0eb0b42bdedf6 (patch)
tree51d784bd86e192cbce55c697ad1fb980dc12c9b9
parent178a4916da838e46e46e769e566e47fff6eff8f8 (diff)
downloadclsocket-to-upstream.tar.gz
clsocket-to-upstream.tar.bz2
clsocket-to-upstream.tar.xz
Compile static library as PICto-upstream
Otherwise, when linked against shared libraries, position dependent code is included. Cross-platform support for handling this was added in cmake 2.8.9.
-rw-r--r--CMakeLists.txt3
1 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0795081..49cf388 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
+cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
project(clsocket)
# set up versioning.
@@ -67,6 +67,7 @@ else()
else()
ADD_LIBRARY(clsocket STATIC ${CLSOCKET_SOURCES})
endif()
+ set_target_properties(clsocket PROPERTIES POSITION_INDEPENDENT_CODE True)
endif()
TARGET_LINK_LIBRARIES(clsocket ${PROJECT_LIBS})