From 76fff567612baf12c325183d6b1885185c89073c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20G=C3=BCntner?= Date: Sat, 7 Oct 2023 18:54:04 +0200 Subject: [PATCH] cmake: build and link static variant of cannelloni-common this resolves issues with dynamic linking --- CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f75459..3d8b371 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,6 +57,10 @@ add_library(cannelloni-common SHARED parser.cpp decoder.cpp) +add_library(cannelloni-common-static STATIC + parser.cpp + decoder.cpp) + set_target_properties ( cannelloni-common PROPERTIES VERSION 0.0.1 @@ -71,7 +75,7 @@ if(SCTP_SUPPORT) target_link_libraries(addsources sctpthread) endif(SCTP_SUPPORT) set_target_properties(addsources PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(cannelloni addsources cannelloni-common pthread) +target_link_libraries(cannelloni addsources cannelloni-common-static pthread) target_compile_features(cannelloni PRIVATE cxx_auto_type) target_compile_features(addsources PRIVATE cxx_auto_type)