From 72cd969bdad28b8bc6094a1503a774005b6f1257 Mon Sep 17 00:00:00 2001 From: sanine Date: Wed, 7 Sep 2022 21:13:44 -0500 Subject: use static libraries and fix build on windows --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index e223470..437601c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ option(MOSSROSE_BUILD_TESTS "Build the tests" OFF) ######## third-party libraries ######## add_subdirectory(${CMAKE_SOURCE_DIR}/3rdparty/portaudio EXCLUDE_FROM_ALL) add_subdirectory(${CMAKE_SOURCE_DIR}/3rdparty/plibsys EXCLUDE_FROM_ALL) -add_subdirectory(${CMAKE_SOURCE_DIR}/3rdparty/libwav EXCLUDE_FROM_ALL) +#add_subdirectory(${CMAKE_SOURCE_DIR}/3rdparty/libwav EXCLUDE_FROM_ALL) add_library(mossrose) set_target_properties(mossrose PROPERTIES @@ -22,7 +22,10 @@ set_target_properties(mossrose PROPERTIES VERSION ${PROJECT_VERSION} PUBLIC_HEADER src/mossrose.h ) -target_link_libraries(mossrose portaudio plibsys wav::wav m) +target_link_libraries(mossrose portaudio_static plibsysstatic) +if (UNIX) + target_link_libraries(mossrose m) +endif() if (MOSSROSE_BUILD_EXAMPLES) @@ -33,7 +36,10 @@ endif() if (MOSSROSE_BUILD_TESTS) add_executable(test) - target_link_libraries(test plibsys m) + target_link_libraries(test plibsysstatic) + if (UNIX) + target_link_libraries(test m) + endif() endif() -- cgit v1.2.1