fix(cmake): Enable -fPIC for static jsoncpp.

This commit is contained in:
Chase Geigle 2018-09-01 01:07:58 -05:00
parent 6ff04022c4
commit cb0a351404
No known key found for this signature in database
GPG Key ID: 1020EF3A7626F7DC
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,9 @@ list(APPEND dirs ${XPP_INCLUDE_DIRS})
if(ENABLE_I3)
add_subdirectory(i3ipcpp)
set_property(TARGET i3ipc++ PROPERTY POSITION_INDEPENDENT_CODE ON)
if(TARGET jsoncpp_lib_static)
set_property(TARGET jsoncpp_lib_static PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
set(I3IPCPP_LIBRARIES ${I3IPCPP_LIBRARIES} PARENT_SCOPE)
set(I3IPCPP_INCLUDE_DIRS ${I3IPCPP_INCLUDE_DIRS} PARENT_SCOPE)
endif()