-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
59 lines (45 loc) · 1.7 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
cmake_minimum_required(VERSION 3.13)
project(ryfi)
file(GLOB_RECURSE SRC "vendor/*.cpp" "src/*.cpp")
add_executable(${PROJECT_NAME} ${SRC})
target_include_directories(${PROJECT_NAME} PRIVATE "vendor/")
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
add_subdirectory("libcorrect/")
target_include_directories(${PROJECT_NAME} PUBLIC "libcorrect/include")
target_link_libraries(${PROJECT_NAME} PUBLIC correct_static)
if (MSVC)
# Lib path
target_link_directories(${PROJECT_NAME} PRIVATE "C:/Program Files/PothosSDR/lib/")
# Misc headers
target_include_directories(${PROJECT_NAME} PRIVATE "C:/Program Files/PothosSDR/include/")
# Volk
target_link_libraries(${PROJECT_NAME} PRIVATE volk bladeRF LimeSuite)
# FFTW3
find_package(FFTW3f CONFIG REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE FFTW3::fftw3f)
else()
find_package(PkgConfig)
pkg_check_modules(FFTW3 REQUIRED fftw3f)
pkg_check_modules(VOLK REQUIRED volk)
pkg_check_modules(LIBBLADERF REQUIRED libbladeRF)
target_include_directories(${PROJECT_NAME} PRIVATE
${FFTW3_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${LIBBLADERF_INCLUDE_DIRS}
)
target_link_directories(${PROJECT_NAME} PRIVATE
${FFTW3_LIBRARY_DIRS}
${VOLK_LIBRARY_DIRS}
${LIBBLADERF_LIBRARY_DIRS}
)
target_link_libraries(${PROJECT_NAME} PRIVATE
${FFTW3_LIBRARIES}
${VOLK_LIBRARIES}
${LIBBLADERF_LIBRARIES}
LimeSuite
)
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_link_libraries(${PROJECT_NAME} PRIVATE stdc++fs pthread)
target_include_directories(${PROJECT_NAME} PRIVATE "/usr/local/include")
endif ()
endif ()