Build parson with PIC

This commit is contained in:
Rodrigo Arias 2022-12-19 14:05:44 +01:00
parent 168ba99828
commit 5a982d61c9
2 changed files with 5 additions and 1 deletions

View File

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

View File

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