From 70250813b7619de9f702b1106ea086941a5ba153 Mon Sep 17 00:00:00 2001 From: Marcus Tomlinson Date: Sun, 24 Feb 2019 15:18:51 +0000 Subject: [PATCH] Fix CMake VS build --- CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 89b5372..19d2c54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,7 +25,6 @@ endif() # Necessary for Windows if(WIN32) - set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON) set(CMAKE_DEBUG_POSTFIX "d") endif() @@ -197,6 +196,9 @@ if (NEED_PTHREAD) list(APPEND LINKLIBS Threads::Threads) endif() +# Set compile-time definitions +add_definitions(${API_DEFS}) + # Create library targets. cmake_policy(SET CMP0042 OLD) set(LIB_TARGETS) @@ -216,7 +218,6 @@ if(BUILD_SHARED_LIBS) ${INCDIRS}) # Set compile-time definitions - target_compile_definitions(rtaudio PRIVATE ${API_DEFS}) target_compile_definitions(rtaudio PRIVATE RTAUDIO_EXPORT) target_link_libraries(rtaudio ${LINKLIBS}) @@ -237,9 +238,6 @@ if(BUILD_STATIC_LIBS) $ ${INCDIRS}) - # Set compile-time definitions - target_compile_definitions(rtaudio_static PRIVATE ${API_DEFS}) - target_link_libraries(rtaudio_static ${LINKLIBS}) endif() -- 2.30.2