2020-09-19 12:48:34 +02:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
project(sdrpp_core)
|
2020-06-10 04:13:56 +02:00
|
|
|
|
2020-10-04 02:56:02 +02:00
|
|
|
# Cross platform modules
|
2020-09-19 12:48:34 +02:00
|
|
|
add_subdirectory("core")
|
|
|
|
add_subdirectory("radio")
|
2020-10-01 13:46:12 +02:00
|
|
|
add_subdirectory("recorder")
|
|
|
|
add_subdirectory("soapy")
|
|
|
|
add_subdirectory("file_source")
|
2020-10-04 02:56:02 +02:00
|
|
|
add_subdirectory("rtl_tcp_source")
|
2020-09-19 12:48:34 +02:00
|
|
|
add_subdirectory("demo")
|
2020-09-06 15:39:09 +02:00
|
|
|
|
2020-10-07 22:44:54 +02:00
|
|
|
if (MSVC)
|
|
|
|
set(CMAKE_CXX_FLAGS "-O2 /std:c++17")
|
|
|
|
else()
|
|
|
|
set(CMAKE_CXX_FLAGS "-O3 -std=c++17")
|
|
|
|
endif (MSVC)
|
|
|
|
|
2020-09-19 12:48:34 +02:00
|
|
|
add_executable(sdrpp "src/main.cpp" "win32/resources.rc")
|
|
|
|
target_link_libraries(sdrpp PRIVATE sdrpp_core)
|
2020-06-22 16:45:57 +02:00
|
|
|
|
2020-09-19 12:48:34 +02:00
|
|
|
# Copy dynamic libs over
|
2020-08-16 03:39:05 +02:00
|
|
|
if (MSVC)
|
2020-09-19 12:48:34 +02:00
|
|
|
add_custom_target(do_always ALL xcopy /s \"$<TARGET_FILE_DIR:sdrpp_core>\\*.dll\" \"$<TARGET_FILE_DIR:sdrpp>\" /Y)
|
|
|
|
else()
|
|
|
|
add_custom_target(do_always ALL cp \"$<TARGET_FILE_DIR:sdrpp_core>/sdrpp_core.so\" \"$<TARGET_FILE_DIR:sdrpp>\")
|
2020-07-20 00:43:36 +02:00
|
|
|
endif (MSVC)
|
2020-07-19 15:59:44 +02:00
|
|
|
|
2020-10-06 10:54:00 +02:00
|
|
|
# cmake .. "-DCMAKE_TOOLCHAIN_FILE=C:/Users/Alex/vcpkg/scripts/buildsystems/vcpkg.cmake" -G "Visual Studio 15 2017 Win64"
|