SDRPlusPlus/CMakeLists.txt
2020-07-09 16:02:58 +02:00

47 lines
1.2 KiB
CMake

cmake_minimum_required(VERSION 3.9)
project(sdrpp)
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
# Compiler config
set(CMAKE_CXX_FLAGS "-O2 /std:c++17")
# HackRF
include_directories(sdrpp "C:/Program Files/PothosSDR/include/libhackrf/")
link_directories(sdrpp "C:/Program Files/PothosSDR/lib/")
link_libraries(hackrf)
# Volk
include_directories(sdrpp "C:/Program Files/PothosSDR/include/volk/")
link_libraries(volk)
# SoapySDR
include_directories(sdrpp "C:/Program Files/PothosSDR/include/")
link_libraries(SoapySDR)
# Main code
include_directories(sdrpp "src/")
include_directories(sdrpp "src/imgui")
file(GLOB SRC "src/*.cpp")
file(GLOB IMGUI "src/imgui/*.cpp")
add_executable(sdrpp ${SRC} ${IMGUI})
# Glew
find_package(GLEW REQUIRED)
target_link_libraries(sdrpp PRIVATE GLEW::GLEW)
# GLFW3
find_package(glfw3 CONFIG REQUIRED)
target_link_libraries(sdrpp PRIVATE glfw)
# FFTW3
find_package(FFTW3 CONFIG REQUIRED)
target_link_libraries(sdrpp PRIVATE FFTW3::fftw3)
find_package(FFTW3f CONFIG REQUIRED)
target_link_libraries(sdrpp PRIVATE FFTW3::fftw3f)
find_package(FFTW3l CONFIG REQUIRED)
target_link_libraries(sdrpp PRIVATE FFTW3::fftw3l)
# PortAudio
find_package(portaudio CONFIG REQUIRED)
target_link_libraries(sdrpp PRIVATE portaudio portaudio_static)