cmake_minimum_required(VERSION 3.8)
project(hellosoapy CXX)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()

# SoapySDR is the only dependency.  This program deliberately does not touch
# libsdr or any Amarisoft header: everything goes through the SoapySDR API,
# which is what makes it a valid test of the support module.
find_package(SoapySDR "0.7" REQUIRED)

add_executable(hellosoapy hellosoapy.cpp)

target_link_libraries(hellosoapy PRIVATE SoapySDR)

target_compile_options(hellosoapy PRIVATE -Wall -Wextra)

install(TARGETS hellosoapy RUNTIME DESTINATION bin)
