Skip to content

Commit

Permalink
cmake: build and link static variant of cannelloni-common
Browse files Browse the repository at this point in the history
this resolves issues with dynamic linking
  • Loading branch information
mguentner committed Oct 7, 2023
1 parent 708f23c commit 76fff56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down

0 comments on commit 76fff56

Please sign in to comment.