From ee34ac1fbbdb97220ec0dd6110353c1a387453ee Mon Sep 17 00:00:00 2001 From: Kamel CHAOUCHE Date: Tue, 12 Jun 2018 17:38:41 +0200 Subject: [PATCH] Add position independent code feature to CMakeList.txt Enable Position Independent Code for shared lib --- src/lib_json/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib_json/CMakeLists.txt b/src/lib_json/CMakeLists.txt index 9730e9a..d0d717f 100644 --- a/src/lib_json/CMakeLists.txt +++ b/src/lib_json/CMakeLists.txt @@ -73,6 +73,7 @@ IF(BUILD_SHARED_LIBS) SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES VERSION ${JSONCPP_VERSION} SOVERSION ${JSONCPP_SOVERSION}) SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES OUTPUT_NAME jsoncpp DEBUG_OUTPUT_NAME jsoncpp${DEBUG_LIBNAME_SUFFIX} ) + SET_TARGET_PROPERTIES( jsoncpp_lib PROPERTIES POSITION_INDEPENDENT_CODE ON) # Set library's runtime search path on OSX IF(APPLE)