diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a7bcb60..89fc089 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -5,6 +5,10 @@ add_subdirectory(include) add_library(parson STATIC parson.c) target_include_directories(parson PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") +set_property(TARGET parson PROPERTY POSITION_INDEPENDENT_CODE ON) + +add_library(parson-static STATIC parson.c) +target_include_directories(parson-static PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") configure_file("config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h" ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/rt/CMakeLists.txt b/src/rt/CMakeLists.txt index 0ce4af8..d9f2df8 100644 --- a/src/rt/CMakeLists.txt +++ b/src/rt/CMakeLists.txt @@ -11,7 +11,7 @@ set_target_properties(ovni PROPERTIES SOVERSION 1) add_library(ovni-static STATIC ovni.c) -target_link_libraries(ovni-static parson) +target_link_libraries(ovni-static parson-static) target_include_directories(ovni-static PUBLIC "${CMAKE_SOURCE_DIR}/include") install(TARGETS ovni LIBRARY DESTINATION lib)