CMakeLists cleanup

This commit is contained in:
AlexandreRouma
2021-10-04 02:34:17 +02:00
parent c515ddb811
commit 44ad0a1a7e
28 changed files with 223 additions and 226 deletions

View File

@ -1,14 +1,6 @@
cmake_minimum_required(VERSION 3.13)
project(falcon9_decoder)
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 ()
file(GLOB_RECURSE SRC "src/*.cpp" "src/*.c")
include_directories("src/")
@ -20,5 +12,13 @@ add_library(falcon9_decoder SHARED ${SRC})
target_link_libraries(falcon9_decoder PRIVATE sdrpp_core)
set_target_properties(falcon9_decoder PROPERTIES PREFIX "")
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(TARGETS falcon9_decoder DESTINATION lib/sdrpp/plugins)

View File

@ -1,14 +1,6 @@
cmake_minimum_required(VERSION 3.13)
project(m17_decoder)
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 ()
file(GLOB_RECURSE SRC "src/*.cpp" "src/*.c")
include_directories("src/")
@ -19,7 +11,13 @@ add_library(m17_decoder SHARED ${SRC})
target_link_libraries(m17_decoder PRIVATE sdrpp_core)
set_target_properties(m17_decoder PROPERTIES PREFIX "")
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)
# Lib path

View File

@ -1,14 +1,6 @@
cmake_minimum_required(VERSION 3.13)
project(meteor_demodulator)
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 ()
file(GLOB_RECURSE SRC "src/*.cpp" "src/*.c")
include_directories("src/")
@ -20,5 +12,13 @@ add_library(meteor_demodulator SHARED ${SRC})
target_link_libraries(meteor_demodulator PRIVATE sdrpp_core)
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(TARGETS meteor_demodulator DESTINATION lib/sdrpp/plugins)

View File

@ -1,14 +1,6 @@
cmake_minimum_required(VERSION 3.13)
project(radio)
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 ()
file(GLOB SRC "src/*.cpp")
include_directories("src/")
@ -17,5 +9,13 @@ add_library(radio SHARED ${SRC})
target_link_libraries(radio PRIVATE sdrpp_core)
set_target_properties(radio PROPERTIES PREFIX "")
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(TARGETS radio DESTINATION lib/sdrpp/plugins)

View File

@ -1,14 +1,6 @@
cmake_minimum_required(VERSION 3.13)
project(weather_sat_decoder)
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 ()
file(GLOB_RECURSE SRC "src/*.cpp" "src/*.c")
include_directories("src/")
@ -20,5 +12,13 @@ add_library(weather_sat_decoder SHARED ${SRC})
target_link_libraries(weather_sat_decoder PRIVATE sdrpp_core)
set_target_properties(weather_sat_decoder PROPERTIES PREFIX "")
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(TARGETS weather_sat_decoder DESTINATION lib/sdrpp/plugins)