This commit is contained in:
AlexandreRouma 2022-06-23 22:25:39 +02:00
parent fb0e0d732b
commit 7d64d78d67
34 changed files with 276 additions and 9 deletions

View File

@ -17,15 +17,6 @@ if (ANDROID)
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=c++17") set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=c++17")
endif (ANDROID) endif (ANDROID)
# 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 ()
# Backends # Backends
option(OPT_BACKEND_GLFW "Use the GLFW backend" ON) option(OPT_BACKEND_GLFW "Use the GLFW backend" ON)
option(OPT_BACKEND_ANDROID "Use the Android backend" OFF) option(OPT_BACKEND_ANDROID "Use the Android backend" OFF)
@ -218,12 +209,23 @@ endif (OPT_BUILD_SCHEDULER)
add_executable(sdrpp "src/main.cpp" "win32/resources.rc") add_executable(sdrpp "src/main.cpp" "win32/resources.rc")
target_link_libraries(sdrpp PRIVATE sdrpp_core) 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 # Copy dynamic libs over
if (MSVC) if (MSVC)
add_custom_target(do_always ALL xcopy /s \"$<TARGET_FILE_DIR:sdrpp_core>\\*.dll\" \"$<TARGET_FILE_DIR:sdrpp>\" /Y) add_custom_target(do_always ALL xcopy /s \"$<TARGET_FILE_DIR:sdrpp_core>\\*.dll\" \"$<TARGET_FILE_DIR:sdrpp>\" /Y)
add_custom_target(do_always_volk ALL xcopy /s \"C:/Program Files/PothosSDR/bin\\volk.dll\" \"$<TARGET_FILE_DIR:sdrpp>\" /Y) add_custom_target(do_always_volk ALL xcopy /s \"C:/Program Files/PothosSDR/bin\\volk.dll\" \"$<TARGET_FILE_DIR:sdrpp>\" /Y)
endif () endif ()
if (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") if (${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
add_custom_target(do_always ALL cp \"$<TARGET_FILE_DIR:sdrpp_core>/libsdrpp_core.so\" \"$<TARGET_FILE_DIR:sdrpp>\") add_custom_target(do_always ALL cp \"$<TARGET_FILE_DIR:sdrpp_core>/libsdrpp_core.so\" \"$<TARGET_FILE_DIR:sdrpp>\")
endif () endif ()

View File

@ -29,6 +29,15 @@ endif (OPT_BACKEND_ANDROID)
# Add code to dyn lib # Add code to dyn lib
add_library(sdrpp_core SHARED ${SRC} ${BACKEND_SRC}) add_library(sdrpp_core SHARED ${SRC} ${BACKEND_SRC})
# Set compiler options
if (MSVC)
target_compile_options(sdrpp_core PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(sdrpp_core PRIVATE -O3 -std=c++17)
else ()
target_compile_options(sdrpp_core PRIVATE -O3 -std=c++17)
endif ()
# Set the install prefix # Set the install prefix
target_compile_definitions(sdrpp_core PUBLIC INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}") target_compile_definitions(sdrpp_core PUBLIC INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}")

View File

@ -9,5 +9,13 @@ set_target_properties(falcon9_decoder PROPERTIES PREFIX "")
target_include_directories(falcon9_decoder PRIVATE "src/") target_include_directories(falcon9_decoder PRIVATE "src/")
if (MSVC)
target_compile_options(falcon9_decoder PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(falcon9_decoder PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(falcon9_decoder PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS falcon9_decoder DESTINATION lib/sdrpp/plugins) install(TARGETS falcon9_decoder DESTINATION lib/sdrpp/plugins)

View File

@ -9,5 +9,13 @@ set_target_properties(kg_sstv_decoder PROPERTIES PREFIX "")
target_include_directories(kg_sstv_decoder PRIVATE "src/") target_include_directories(kg_sstv_decoder PRIVATE "src/")
if (MSVC)
target_compile_options(kg_sstv_decoder PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(kg_sstv_decoder PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(kg_sstv_decoder PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS kg_sstv_decoder DESTINATION lib/sdrpp/plugins) install(TARGETS kg_sstv_decoder DESTINATION lib/sdrpp/plugins)

View File

@ -9,6 +9,14 @@ set_target_properties(m17_decoder PROPERTIES PREFIX "")
target_include_directories(m17_decoder PRIVATE "src/") target_include_directories(m17_decoder PRIVATE "src/")
if (MSVC)
target_compile_options(m17_decoder PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(m17_decoder PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(m17_decoder PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_include_directories(m17_decoder PRIVATE "C:/Program Files/codec2/include/") target_include_directories(m17_decoder PRIVATE "C:/Program Files/codec2/include/")

View File

@ -9,5 +9,13 @@ add_library(meteor_demodulator SHARED ${SRC})
target_link_libraries(meteor_demodulator PRIVATE sdrpp_core) target_link_libraries(meteor_demodulator PRIVATE sdrpp_core)
set_target_properties(meteor_demodulator PROPERTIES PREFIX "") set_target_properties(meteor_demodulator PROPERTIES PREFIX "")
if (MSVC)
target_compile_options(meteor_demodulator PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(meteor_demodulator PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(meteor_demodulator PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS meteor_demodulator DESTINATION lib/sdrpp/plugins) install(TARGETS meteor_demodulator DESTINATION lib/sdrpp/plugins)

View File

@ -9,5 +9,13 @@ set_target_properties(radio PROPERTIES PREFIX "")
target_include_directories(radio PRIVATE "src/") target_include_directories(radio PRIVATE "src/")
if (MSVC)
target_compile_options(radio PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(radio PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(radio PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS radio DESTINATION lib/sdrpp/plugins) install(TARGETS radio DESTINATION lib/sdrpp/plugins)

View File

@ -9,5 +9,13 @@ set_target_properties(weather_sat_decoder PROPERTIES PREFIX "")
target_include_directories(weather_sat_decoder PRIVATE "src/") target_include_directories(weather_sat_decoder PRIVATE "src/")
if (MSVC)
target_compile_options(weather_sat_decoder PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(weather_sat_decoder PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(weather_sat_decoder PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS weather_sat_decoder DESTINATION lib/sdrpp/plugins) install(TARGETS weather_sat_decoder DESTINATION lib/sdrpp/plugins)

View File

@ -9,5 +9,13 @@ set_target_properties(demo PROPERTIES PREFIX "")
target_include_directories(demo PRIVATE "src/") target_include_directories(demo PRIVATE "src/")
if (MSVC)
target_compile_options(demo PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(demo PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(demo PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS demo DESTINATION lib/sdrpp/plugins) install(TARGETS demo DESTINATION lib/sdrpp/plugins)

View File

@ -17,5 +17,13 @@ set_target_properties(discord_integration PROPERTIES PREFIX "")
target_include_directories(discord_integration PRIVATE "src/" "discord-rpc/include" "../../decoder_modules/radio/src/") target_include_directories(discord_integration PRIVATE "src/" "discord-rpc/include" "../../decoder_modules/radio/src/")
if (MSVC)
target_compile_options(discord_integration PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(discord_integration PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(discord_integration PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS discord_integration DESTINATION lib/sdrpp/plugins) install(TARGETS discord_integration DESTINATION lib/sdrpp/plugins)

View File

@ -9,5 +9,13 @@ set_target_properties(frequency_manager PROPERTIES PREFIX "")
target_include_directories(frequency_manager PRIVATE "src/" "../../decoder_modules/radio/src") target_include_directories(frequency_manager PRIVATE "src/" "../../decoder_modules/radio/src")
if (MSVC)
target_compile_options(frequency_manager PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(frequency_manager PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(frequency_manager PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS frequency_manager DESTINATION lib/sdrpp/plugins) install(TARGETS frequency_manager DESTINATION lib/sdrpp/plugins)

View File

@ -9,5 +9,13 @@ set_target_properties(recorder PROPERTIES PREFIX "")
target_include_directories(recorder PRIVATE "src/") target_include_directories(recorder PRIVATE "src/")
if (MSVC)
target_compile_options(recorder PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(recorder PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(recorder PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS recorder DESTINATION lib/sdrpp/plugins) install(TARGETS recorder DESTINATION lib/sdrpp/plugins)

View File

@ -12,5 +12,13 @@ target_include_directories(rigctl_server PRIVATE "../recorder/src")
target_include_directories(rigctl_server PRIVATE "../../decoder_modules/meteor_demodulator/src") target_include_directories(rigctl_server PRIVATE "../../decoder_modules/meteor_demodulator/src")
target_include_directories(rigctl_server PRIVATE "../../decoder_modules/radio/src") target_include_directories(rigctl_server PRIVATE "../../decoder_modules/radio/src")
if (MSVC)
target_compile_options(rigctl_server PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(rigctl_server PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(rigctl_server PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS rigctl_server DESTINATION lib/sdrpp/plugins) install(TARGETS rigctl_server DESTINATION lib/sdrpp/plugins)

View File

@ -9,5 +9,13 @@ set_target_properties(scanner PROPERTIES PREFIX "")
target_include_directories(scanner PRIVATE "src/") target_include_directories(scanner PRIVATE "src/")
if (MSVC)
target_compile_options(scanner PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(scanner PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(scanner PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS scanner DESTINATION lib/sdrpp/plugins) install(TARGETS scanner DESTINATION lib/sdrpp/plugins)

View File

@ -9,5 +9,13 @@ set_target_properties(scheduler PROPERTIES PREFIX "")
target_include_directories(scheduler PRIVATE "src/") target_include_directories(scheduler PRIVATE "src/")
if (MSVC)
target_compile_options(scheduler PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(scheduler PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(scheduler PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS scheduler DESTINATION lib/sdrpp/plugins) install(TARGETS scheduler DESTINATION lib/sdrpp/plugins)

View File

@ -9,6 +9,14 @@ set_target_properties(audio_sink PROPERTIES PREFIX "")
target_include_directories(audio_sink PRIVATE "src/") target_include_directories(audio_sink PRIVATE "src/")
if (MSVC)
target_compile_options(audio_sink PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(audio_sink PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(audio_sink PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(audio_sink PRIVATE "C:/Program Files (x86)/RtAudio/lib") target_link_directories(audio_sink PRIVATE "C:/Program Files (x86)/RtAudio/lib")

View File

@ -9,5 +9,13 @@ set_target_properties(network_sink PROPERTIES PREFIX "")
target_include_directories(network_sink PRIVATE "src/") target_include_directories(network_sink PRIVATE "src/")
if (MSVC)
target_compile_options(network_sink PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(network_sink PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(network_sink PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS network_sink DESTINATION lib/sdrpp/plugins) install(TARGETS network_sink DESTINATION lib/sdrpp/plugins)

View File

@ -9,6 +9,14 @@ set_target_properties(new_portaudio_sink PROPERTIES PREFIX "")
target_include_directories(new_portaudio_sink PRIVATE "src/") target_include_directories(new_portaudio_sink PRIVATE "src/")
if (MSVC)
target_compile_options(new_portaudio_sink PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(new_portaudio_sink PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(new_portaudio_sink PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
find_package(portaudio CONFIG REQUIRED) find_package(portaudio CONFIG REQUIRED)
target_link_libraries(new_portaudio_sink PRIVATE portaudio) target_link_libraries(new_portaudio_sink PRIVATE portaudio)

View File

@ -9,6 +9,14 @@ set_target_properties(audio_sink PROPERTIES PREFIX "")
target_include_directories(audio_sink PRIVATE "src/") target_include_directories(audio_sink PRIVATE "src/")
if (MSVC)
target_compile_options(audio_sink PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(audio_sink PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(audio_sink PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
find_package(portaudio CONFIG REQUIRED) find_package(portaudio CONFIG REQUIRED)
target_link_libraries(audio_sink PRIVATE portaudio) target_link_libraries(audio_sink PRIVATE portaudio)

View File

@ -9,6 +9,14 @@ set_target_properties(airspy_source PROPERTIES PREFIX "")
target_include_directories(airspy_source PRIVATE "src/") target_include_directories(airspy_source PRIVATE "src/")
if (MSVC)
target_compile_options(airspy_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(airspy_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(airspy_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(airspy_source PRIVATE "C:/Program Files/PothosSDR/bin/") target_link_directories(airspy_source PRIVATE "C:/Program Files/PothosSDR/bin/")

View File

@ -9,6 +9,14 @@ set_target_properties(airspyhf_source PROPERTIES PREFIX "")
target_include_directories(airspyhf_source PRIVATE "src/") target_include_directories(airspyhf_source PRIVATE "src/")
if (MSVC)
target_compile_options(airspyhf_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(airspyhf_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(airspyhf_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(airspyhf_source PRIVATE "C:/Program Files/PothosSDR/bin/") target_link_directories(airspyhf_source PRIVATE "C:/Program Files/PothosSDR/bin/")

View File

@ -9,6 +9,14 @@ set_target_properties(bladerf_source PROPERTIES PREFIX "")
target_include_directories(bladerf_source PRIVATE "src/") target_include_directories(bladerf_source PRIVATE "src/")
if (MSVC)
target_compile_options(bladerf_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(bladerf_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(bladerf_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(bladerf_source PRIVATE "C:/Program Files/PothosSDR/bin/") target_link_directories(bladerf_source PRIVATE "C:/Program Files/PothosSDR/bin/")

View File

@ -9,5 +9,13 @@ set_target_properties(file_source PROPERTIES PREFIX "")
target_include_directories(file_source PRIVATE "src/") target_include_directories(file_source PRIVATE "src/")
if (MSVC)
target_compile_options(file_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(file_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(file_source PRIVATE -O3 -std=c++17)
endif ()
# Install directives # Install directives
install(TARGETS file_source DESTINATION lib/sdrpp/plugins) install(TARGETS file_source DESTINATION lib/sdrpp/plugins)

View File

@ -9,6 +9,14 @@ set_target_properties(hackrf_source PROPERTIES PREFIX "")
target_include_directories(hackrf_source PRIVATE "src/") target_include_directories(hackrf_source PRIVATE "src/")
if (MSVC)
target_compile_options(hackrf_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(hackrf_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(hackrf_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(hackrf_source PRIVATE "C:/Program Files/PothosSDR/bin/") target_link_directories(hackrf_source PRIVATE "C:/Program Files/PothosSDR/bin/")

View File

@ -9,6 +9,14 @@ set_target_properties(limesdr_source PROPERTIES PREFIX "")
target_include_directories(limesdr_source PRIVATE "src/") target_include_directories(limesdr_source PRIVATE "src/")
if (MSVC)
target_compile_options(limesdr_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(limesdr_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(limesdr_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(limesdr_source PRIVATE "C:/Program Files/PothosSDR/lib") target_link_directories(limesdr_source PRIVATE "C:/Program Files/PothosSDR/lib")

View File

@ -9,6 +9,14 @@ set_target_properties(plutosdr_source PROPERTIES PREFIX "")
target_include_directories(plutosdr_source PRIVATE "src/") target_include_directories(plutosdr_source PRIVATE "src/")
if (MSVC)
target_compile_options(plutosdr_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(plutosdr_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(plutosdr_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(plutosdr_source PRIVATE "C:/Program Files/PothosSDR/lib/") target_link_directories(plutosdr_source PRIVATE "C:/Program Files/PothosSDR/lib/")

View File

@ -9,6 +9,14 @@ set_target_properties(rfspace_source PROPERTIES PREFIX "")
target_include_directories(rfspace_source PRIVATE "src/") target_include_directories(rfspace_source PRIVATE "src/")
if (MSVC)
target_compile_options(rfspace_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(rfspace_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(rfspace_source PRIVATE -O3 -std=c++17)
endif ()
if(WIN32) if(WIN32)
target_link_libraries(rfspace_source PRIVATE wsock32 ws2_32) target_link_libraries(rfspace_source PRIVATE wsock32 ws2_32)
endif() endif()

View File

@ -9,6 +9,14 @@ set_target_properties(rtl_sdr_source PROPERTIES PREFIX "")
target_include_directories(rtl_sdr_source PRIVATE "src/") target_include_directories(rtl_sdr_source PRIVATE "src/")
if (MSVC)
target_compile_options(rtl_sdr_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(rtl_sdr_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(rtl_sdr_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(rtl_sdr_source PRIVATE "C:/Program Files/PothosSDR/bin/") target_link_directories(rtl_sdr_source PRIVATE "C:/Program Files/PothosSDR/bin/")

View File

@ -9,6 +9,14 @@ set_target_properties(rtl_tcp_source PROPERTIES PREFIX "")
target_include_directories(rtl_tcp_source PRIVATE "src/") target_include_directories(rtl_tcp_source PRIVATE "src/")
if (MSVC)
target_compile_options(rtl_tcp_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(rtl_tcp_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(rtl_tcp_source PRIVATE -O3 -std=c++17)
endif ()
if(WIN32) if(WIN32)
target_link_libraries(rtl_tcp_source PRIVATE wsock32 ws2_32) target_link_libraries(rtl_tcp_source PRIVATE wsock32 ws2_32)
endif() endif()

View File

@ -14,6 +14,14 @@ set_target_properties(sddc_source PROPERTIES PREFIX "")
target_include_directories(sddc_source PRIVATE "src/" "src/libsddc/" "src/libsddc/Core/" "src/libsddc/Core/pffft/" "src/libsddc/libsddc/") target_include_directories(sddc_source PRIVATE "src/" "src/libsddc/" "src/libsddc/Core/" "src/libsddc/Core/pffft/" "src/libsddc/libsddc/")
if (MSVC)
target_compile_options(sddc_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(sddc_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(sddc_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(sddc_source PRIVATE "C:/Program Files/PothosSDR/lib/") target_link_directories(sddc_source PRIVATE "C:/Program Files/PothosSDR/lib/")

View File

@ -9,6 +9,14 @@ set_target_properties(sdrplay_source PROPERTIES PREFIX "")
target_include_directories(sdrplay_source PRIVATE "src/") target_include_directories(sdrplay_source PRIVATE "src/")
if (MSVC)
target_compile_options(sdrplay_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(sdrplay_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(sdrplay_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(sdrplay_source PRIVATE "C:/Program Files/SDRplay/API/x64") target_link_directories(sdrplay_source PRIVATE "C:/Program Files/SDRplay/API/x64")

View File

@ -9,6 +9,14 @@ set_target_properties(sdrpp_server_source PROPERTIES PREFIX "")
target_include_directories(sdrpp_server_source PRIVATE "src/") target_include_directories(sdrpp_server_source PRIVATE "src/")
if (MSVC)
target_compile_options(sdrpp_server_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(sdrpp_server_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(sdrpp_server_source PRIVATE -O3 -std=c++17)
endif ()
if(WIN32) if(WIN32)
target_link_libraries(sdrpp_server_source PRIVATE wsock32 ws2_32) target_link_libraries(sdrpp_server_source PRIVATE wsock32 ws2_32)
endif() endif()

View File

@ -9,6 +9,14 @@ set_target_properties(soapy_source PROPERTIES PREFIX "")
target_include_directories(soapy_source PRIVATE "src/") target_include_directories(soapy_source PRIVATE "src/")
if (MSVC)
target_compile_options(soapy_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(soapy_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(soapy_source PRIVATE -O3 -std=c++17)
endif ()
if (MSVC) if (MSVC)
# Lib path # Lib path
target_link_directories(soapy_source PRIVATE "C:/Program Files/PothosSDR/lib/") target_link_directories(soapy_source PRIVATE "C:/Program Files/PothosSDR/lib/")

View File

@ -9,6 +9,14 @@ set_target_properties(spyserver_source PROPERTIES PREFIX "")
target_include_directories(spyserver_source PRIVATE "src/") target_include_directories(spyserver_source PRIVATE "src/")
if (MSVC)
target_compile_options(spyserver_source PRIVATE /O2 /Ob2 /std:c++17 /EHsc)
elseif (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
target_compile_options(spyserver_source PRIVATE -O3 -std=c++17 -Wno-unused-command-line-argument -undefined dynamic_lookup)
else ()
target_compile_options(spyserver_source PRIVATE -O3 -std=c++17)
endif ()
if(WIN32) if(WIN32)
target_link_libraries(spyserver_source PRIVATE wsock32 ws2_32) target_link_libraries(spyserver_source PRIVATE wsock32 ws2_32)
endif() endif()