diff --git a/CMakeLists.txt b/CMakeLists.txt index d479acf5..bc77a37d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -158,18 +158,19 @@ if (OPT_BUILD_RIGCTL_SERVER) add_subdirectory("misc_modules/rigctl_server") endif (OPT_BUILD_RIGCTL_SERVER) -# Compiler arguments for each platform -if (MSVC) - add_compile_options(/O2 /Ob2 /std:c++17 /EHsc) -elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - add_compile_options(-O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup) -else () - add_compile_options(-O3 -std=c++17) -endif () - add_executable(sdrpp "src/main.cpp" "win32/resources.rc") target_link_libraries(sdrpp PRIVATE sdrpp_core) +# Compiler arguments for each platform +if (MSVC) + target_compile_options(sdrpp PRIVATE /O2 /Ob2 /std:c++17 /EHsc) +elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + target_compile_options(sdrpp PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup) +else () + target_compile_options(sdrpp PRIVATE -O3 -std=c++17) +endif () + + # Copy dynamic libs over if (MSVC) add_custom_target(do_always ALL xcopy /s \"$\\*.dll\" \"$\" /Y) diff --git a/sink_modules/portaudio_sink/CMakeLists.txt b/sink_modules/portaudio_sink/CMakeLists.txt index 61003c65..d9209895 100644 --- a/sink_modules/portaudio_sink/CMakeLists.txt +++ b/sink_modules/portaudio_sink/CMakeLists.txt @@ -19,17 +19,17 @@ endif () if (MSVC) find_package(portaudio CONFIG REQUIRED) - target_link_libraries(sdrpp_core PRIVATE portaudio) + target_link_libraries(audio_sink PRIVATE portaudio) else (MSVC) find_package(PkgConfig) pkg_check_modules(PORTAUDIO REQUIRED portaudio-2.0) - target_include_directories(sdrpp_core PRIVATE ${PORTAUDIO_INCLUDE_DIRS}) + target_include_directories(audio_sink PRIVATE ${PORTAUDIO_INCLUDE_DIRS}) - target_link_directories(sdrpp_core PRIVATE ${PORTAUDIO_LIBRARY_DIRS}) + target_link_directories(audio_sink PRIVATE ${PORTAUDIO_LIBRARY_DIRS}) - target_link_libraries(sdrpp_core PRIVATE ${PORTAUDIO_LIBRARIES}) + target_link_libraries(audio_sink PRIVATE ${PORTAUDIO_LIBRARIES}) endif (MSVC)