kopia lustrzana https://github.com/AlexandreRouma/SDRPlusPlus
More cmake fixes
rodzic
9555dda8a4
commit
0fffa7d45a
|
@ -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 \"$<TARGET_FILE_DIR:sdrpp_core>\\*.dll\" \"$<TARGET_FILE_DIR:sdrpp>\" /Y)
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue