From 4b5e39c89ce4ed889e3fddcc4204d1a11bcf407f Mon Sep 17 00:00:00 2001 From: Alexandru Ardelean Date: Wed, 3 May 2017 11:59:31 +0300 Subject: [PATCH] build,cmake: generate both static and shared libjson Signed-off-by: Alexandru Ardelean --- CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 965fe8f..f93c0e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,13 +55,20 @@ set(JSON_C_SOURCES ) add_library(json-c + SHARED + ${JSON_C_SOURCES} + ${JSON_C_HEADERS} +) + +add_library(json-c-static + STATIC ${JSON_C_SOURCES} ${JSON_C_HEADERS} ) set_property(TARGET json-c PROPERTY C_STANDARD 99) -install(TARGETS json-c +install(TARGETS json-c json-c-static RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib -- 2.40.0