2023-05-04 11:25:37 +00:00
|
|
|
cmake_minimum_required(VERSION 3.8)
|
2023-12-24 05:35:27 +00:00
|
|
|
if(COMMAND cmake_policy)
|
|
|
|
cmake_policy(SET CMP0003 NEW)
|
|
|
|
endif(COMMAND cmake_policy)
|
2024-01-02 02:52:58 +00:00
|
|
|
|
2023-12-24 01:07:03 +00:00
|
|
|
project(blah2)
|
|
|
|
include(CMakePrintHelpers)
|
2023-12-24 05:35:27 +00:00
|
|
|
include(CTest)
|
2023-05-04 11:25:37 +00:00
|
|
|
|
2023-12-24 01:07:03 +00:00
|
|
|
find_package(Threads REQUIRED)
|
2024-01-03 03:30:49 +00:00
|
|
|
find_package(FFTW3 CONFIG REQUIRED)
|
|
|
|
find_package(FFTW3f CONFIG REQUIRED)
|
|
|
|
find_package(FFTW3l CONFIG REQUIRED)
|
2023-12-24 01:07:03 +00:00
|
|
|
find_package(asio CONFIG REQUIRED)
|
2024-01-01 16:58:20 +00:00
|
|
|
find_path(RAPIDJSON_INCLUDE_DIRS "rapidjson/allocators.h")
|
2023-12-24 01:07:03 +00:00
|
|
|
find_package(ryml CONFIG REQUIRED)
|
2024-01-01 16:58:20 +00:00
|
|
|
find_package(httplib CONFIG REQUIRED)
|
|
|
|
find_package(Armadillo CONFIG REQUIRED)
|
2023-12-24 01:07:03 +00:00
|
|
|
find_package(Catch2 CONFIG REQUIRED)
|
2023-05-04 11:25:37 +00:00
|
|
|
|
2024-01-02 02:52:58 +00:00
|
|
|
# TODO: when release CI is finished, don't use these dirs, install target should go to prod
|
2023-12-24 05:35:27 +00:00
|
|
|
SET (PROJECT_ROOT "${PROJECT_SOURCE_DIR}")
|
|
|
|
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_ROOT}/bin")
|
|
|
|
SET (PROJECT_BINARY_TEST_DIR "${PROJECT_ROOT}/bin/test")
|
|
|
|
|
|
|
|
MESSAGE ("Binary path: ${PROJECT_BINARY_DIR}")
|
|
|
|
MESSAGE ("Binary test path: ${PROJECT_BINARY_TEST_DIR}")
|
|
|
|
|
2024-01-02 02:52:58 +00:00
|
|
|
# include from top-level src dir
|
2023-12-24 05:35:27 +00:00
|
|
|
include_directories(src)
|
2023-05-04 11:25:37 +00:00
|
|
|
|
2024-01-02 02:52:58 +00:00
|
|
|
# TODO: create FindSdrplay.cmake for this
|
2023-12-24 01:07:03 +00:00
|
|
|
add_library(sdrplay /usr/local/include/sdrplay_api.h)
|
2023-05-04 11:25:37 +00:00
|
|
|
set_target_properties(sdrplay PROPERTIES LINKER_LANGUAGE C)
|
2023-12-24 01:07:03 +00:00
|
|
|
target_link_libraries(sdrplay PUBLIC /usr/local/lib/libsdrplay_api.so.3.07)
|
2023-05-04 11:25:37 +00:00
|
|
|
|
2023-12-24 01:07:03 +00:00
|
|
|
add_executable(blah2
|
|
|
|
src/blah2.cpp
|
|
|
|
src/capture/Capture.cpp
|
|
|
|
src/capture/rspduo/RspDuo.cpp
|
|
|
|
src/process/ambiguity/Ambiguity.cpp
|
|
|
|
src/process/clutter/WienerHopf.cpp
|
|
|
|
src/process/detection/CfarDetector1D.cpp
|
|
|
|
src/process/detection/Centroid.cpp
|
|
|
|
src/process/detection/Interpolate.cpp
|
|
|
|
src/process/tracker/Tracker.cpp
|
|
|
|
src/process/spectrum/SpectrumAnalyser.cpp
|
|
|
|
src/process/meta/HammingNumber.cpp
|
|
|
|
src/data/IqData.cpp
|
|
|
|
src/data/Map.cpp
|
|
|
|
src/data/Detection.cpp
|
|
|
|
src/data/Track.cpp
|
|
|
|
src/data/meta/Timing.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(blah2 PRIVATE
|
|
|
|
Threads::Threads
|
|
|
|
asio::asio
|
|
|
|
ryml::ryml
|
|
|
|
httplib::httplib
|
|
|
|
armadillo
|
2024-01-03 03:30:49 +00:00
|
|
|
FFTW3::fftw3
|
|
|
|
FFTW3::fftw3f
|
|
|
|
FFTW3::fftw3l
|
2023-12-24 01:07:03 +00:00
|
|
|
sdrplay
|
2023-12-24 05:35:27 +00:00
|
|
|
)
|
2024-01-02 02:52:58 +00:00
|
|
|
target_include_directories(blah2 PRIVATE RAPIDJSON_INCLUDE_DIRS "rapidjson/allocators.h")
|
2023-12-15 06:24:00 +00:00
|
|
|
|
2023-12-18 12:34:47 +00:00
|
|
|
# unit tests
|
|
|
|
add_executable(testAmbiguity
|
2023-12-24 05:35:27 +00:00
|
|
|
test/unit/process/ambiguity/TestAmbiguity.cpp
|
|
|
|
src/data/IqData.cpp
|
|
|
|
src/data/Map.cpp
|
|
|
|
src/process/ambiguity/Ambiguity.cpp
|
|
|
|
src/process/meta/HammingNumber.cpp)
|
2024-01-03 03:30:49 +00:00
|
|
|
target_link_libraries(testAmbiguity PRIVATE
|
|
|
|
Catch2::Catch2WithMain
|
|
|
|
FFTW3::fftw3
|
|
|
|
FFTW3::fftw3f
|
|
|
|
FFTW3::fftw3l
|
|
|
|
)
|
2023-12-28 05:27:43 +00:00
|
|
|
set_target_properties(testAmbiguity PROPERTIES
|
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_TEST_UNIT_DIR}")
|
|
|
|
|
|
|
|
add_executable(testTracker
|
2023-12-24 05:35:27 +00:00
|
|
|
test/unit/process/tracker/TestTracker.cpp
|
|
|
|
src/data/Detection.cpp
|
|
|
|
src/data/Track.cpp
|
|
|
|
src/process/tracker/Tracker.cpp)
|
2023-12-24 01:07:03 +00:00
|
|
|
target_link_libraries(testTracker PRIVATE Catch2::Catch2WithMain)
|
2023-12-28 05:27:43 +00:00
|
|
|
set_target_properties(testTracker PROPERTIES
|
2023-12-24 05:35:27 +00:00
|
|
|
RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_TEST_UNIT_DIR}")
|
|
|
|
|
|
|
|
add_test(NAME testAmbiguity COMMAND testAmbiguity)
|
|
|
|
add_test(NAME testTracker COMMAND testTracker)
|