Skip to content
Snippets Groups Projects
Commit 17dd4d88 authored by Bjoern Riemer's avatar Bjoern Riemer
Browse files

enable -fPIC for static build

parent ce7bad17
No related tags found
No related merge requests found
......@@ -139,6 +139,7 @@ else()
add_library("${CJSON_LIB}-static" STATIC "${HEADERS}" "${SOURCES}")
set_target_properties("${CJSON_LIB}-static" PROPERTIES OUTPUT_NAME "${CJSON_LIB}")
set_target_properties("${CJSON_LIB}-static" PROPERTIES PREFIX "lib")
set_property(TARGET "${CJSON_LIB}-static" PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
if (NOT WIN32)
target_link_libraries("${CJSON_LIB}" m)
......@@ -181,6 +182,7 @@ if(ENABLE_CJSON_UTILS)
target_link_libraries("${CJSON_UTILS_LIB}-static" "${CJSON_LIB}-static")
set_target_properties("${CJSON_UTILS_LIB}-static" PROPERTIES OUTPUT_NAME "${CJSON_UTILS_LIB}")
set_target_properties("${CJSON_UTILS_LIB}-static" PROPERTIES PREFIX "lib")
set_property(TARGET "${CJSON_UTILS_LIB}-static" PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/library_config/libcjson_utils.pc.in"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment