From 826e6f2bb13223d8320f1def3f7e813dc7a35ab9 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sat, 16 Jan 2021 15:37:03 +0200 Subject: [PATCH] ggwave : fix shared lib build --- src/CMakeLists.txt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 60211a6..eeb3e38 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -9,9 +9,8 @@ target_include_directories(ggwave PUBLIC ../include ) -target_link_libraries(ggwave PUBLIC - ) - -target_link_libraries(ggwave PRIVATE - ${CMAKE_DL_LIBS} - ) +if (GGWAVE_LIBRARY_TYPE STREQUAL "SHARED") + target_link_libraries(ggwave PUBLIC + ${CMAKE_DL_LIBS} + ) +endif()