From b20fd3eba5335d75656df3005a9b80a80aa8070a Mon Sep 17 00:00:00 2001 From: Eyck Jentzsch Date: Wed, 28 Sep 2022 19:37:47 +0200 Subject: [PATCH] fix static build --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fd7cceb..7693201 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -79,7 +79,7 @@ if(TARGET jsoncpp::jsoncpp) else() target_link_libraries(${PROJECT_NAME} PUBLIC jsoncpp) endif() -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") +if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND BUILD_SHARED_LIBS) target_link_libraries(${PROJECT_NAME} PUBLIC -Wl,--whole-archive dbt-rise-core -Wl,--no-whole-archive) else() target_link_libraries(${PROJECT_NAME} PUBLIC dbt-rise-core)