Add position independent code feature to CMakeList.txt

Enable Position Independent Code for shared lib
This commit is contained in:
Kamel CHAOUCHE 2018-06-12 17:38:41 +02:00 committed by Christopher Dunn
parent d31a5300e1
commit ee34ac1fbb

View File

@ -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)