2020-11-08 01:00:39 +00:00
|
|
|
cmake_minimum_required(VERSION 3.13.0)
|
2014-11-05 12:34:33 +00:00
|
|
|
|
2020-11-01 12:03:13 +00:00
|
|
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
|
2019-05-24 06:32:40 +00:00
|
|
|
|
2023-09-12 08:20:07 +00:00
|
|
|
if(APPLE)
|
2023-09-13 20:58:51 +00:00
|
|
|
project(sdrangel LANGUAGES C CXX OBJCXX)
|
2023-09-12 08:20:07 +00:00
|
|
|
else()
|
|
|
|
project(sdrangel)
|
|
|
|
endif()
|
2019-05-02 06:07:05 +00:00
|
|
|
|
2019-05-01 09:54:58 +00:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
2016-02-24 10:51:36 +00:00
|
|
|
|
2019-05-03 15:46:01 +00:00
|
|
|
# disable only when needed
|
2020-11-10 01:09:21 +00:00
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
2019-05-03 15:46:01 +00:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
|
|
|
|
2020-11-07 04:31:46 +00:00
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
|
2019-05-02 09:03:40 +00:00
|
|
|
# configure version
|
2022-04-19 05:03:28 +00:00
|
|
|
set(sdrangel_VERSION_MAJOR "7")
|
2024-05-23 22:24:50 +00:00
|
|
|
set(sdrangel_VERSION_MINOR "21")
|
2024-06-25 20:19:14 +00:00
|
|
|
set(sdrangel_VERSION_PATCH "4")
|
2022-05-17 20:26:01 +00:00
|
|
|
set(sdrangel_VERSION_SUFFIX "")
|
2019-05-03 15:46:01 +00:00
|
|
|
|
2019-05-04 12:26:19 +00:00
|
|
|
# SDRAngel cmake options
|
|
|
|
option(DEBUG_OUTPUT "Print debug messages" OFF)
|
2024-04-06 18:54:57 +00:00
|
|
|
option(SANITIZE_ADDRESS "Activate detection of uninitialized memory (AddressSanitizer)" OFF)
|
|
|
|
option(SANITIZE_MEMORY "Activate detection of leaked memory (LeakSanitizer)" OFF)
|
2019-05-04 12:26:19 +00:00
|
|
|
option(RX_SAMPLE_24BIT "Internal 24 bit Rx DSP" ON)
|
|
|
|
option(BUILD_SERVER "Build Server" ON)
|
|
|
|
option(BUILD_GUI "Build GUI" ON)
|
2020-11-08 07:20:09 +00:00
|
|
|
option(HIDE_CONSOLE "Hide console when running GUI on Windows" ON)
|
2019-05-04 12:26:19 +00:00
|
|
|
option(BUNDLE "Enable distribution bundle" OFF)
|
2020-11-09 02:33:18 +00:00
|
|
|
set(ARCH_OPT "native" CACHE STRING "Specify instruction set to use. Will be passed directly as `-march` or `/arch:` argument on supported compilers. \
|
|
|
|
'native' option will figure out host machine compatibilities and set flags accordingly (even with MSVC).")
|
2022-11-17 14:34:54 +00:00
|
|
|
option(ENABLE_QT6 "Build with Qt6 rather than Qt5" OFF)
|
2023-08-13 22:52:57 +00:00
|
|
|
option(ENABLE_PROFILER "Enable runtime profiler" OFF)
|
|
|
|
set(VKFFT_BACKEND 1 CACHE STRING "vkFFT Backend: 0 - Vulkan, 1 - CUDA")
|
2022-06-25 09:56:45 +00:00
|
|
|
|
|
|
|
# Sampling devices enablers
|
2019-05-04 12:26:19 +00:00
|
|
|
option(ENABLE_AIRSPY "Enable AirSpy support" ON)
|
|
|
|
option(ENABLE_AIRSPYHF "Enable AirSpyHF support" ON)
|
|
|
|
option(ENABLE_BLADERF "Enable bladeRF support" ON)
|
|
|
|
option(ENABLE_FUNCUBE "Enable FUNcube support" ON)
|
|
|
|
option(ENABLE_HACKRF "Enable HackRF support" ON)
|
|
|
|
option(ENABLE_IIO "Enable liniio support like PlutoSDR" ON)
|
|
|
|
option(ENABLE_LIMESUITE "Enable limesuite support" ON)
|
|
|
|
option(ENABLE_MIRISDR "Enable LibMiri for old SDRPlay" ON)
|
|
|
|
option(ENABLE_PERSEUS "Enable perseus support" ON)
|
|
|
|
option(ENABLE_RTLSDR "Enable rtl-sdr support" ON)
|
2021-04-11 20:21:36 +00:00
|
|
|
option(ENABLE_SDRPLAY "Enable SDRplay support" ON)
|
2019-05-04 12:26:19 +00:00
|
|
|
option(ENABLE_SOAPYSDR "Enable SoapySDR support" ON)
|
|
|
|
option(ENABLE_XTRX "Enable XTRX support" ON)
|
2019-05-08 09:27:57 +00:00
|
|
|
option(ENABLE_PACK_MIRSDRAPI "Enable inclusion of the mirsdr-api library - for personal use only" OFF)
|
2020-10-02 21:45:28 +00:00
|
|
|
option(ENABLE_USRP "Enable USRP support" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
|
|
|
|
# Channel Rx enablers
|
2022-06-25 21:11:55 +00:00
|
|
|
option(ENABLE_CHANNELRX "Enable channelrx plugins" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
option(ENABLE_CHANNELRX_DEMODADSB "Enable channelrx demodadsb plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODAM "Enable channelrx demodam plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODDATV "Enable channelrx demoddatv plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_RADIOCLOCK "Enable channelrx radioclock plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_RADIOASTRONOMY "Enable channelrx radioastronomy plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODRADIOSONDE "Enable channelrx demodradiosonde plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_FREQTRACKER "Enable channelrx freqtracker plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODATV "Enable channelrx demodatv plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODPAGER "Enable channelrx demodpager plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODDAB "Enable channelrx demoddab plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_UDPSINK "Enable channelrx udpsink plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODAIS "Enable channelrx demodais plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODNFM "Enable channelrx demodnfm plugin" ON)
|
2022-06-30 02:32:00 +00:00
|
|
|
option(ENABLE_CHANNELRX_DEMODM17 "Enable channelrx demodm17 plugin" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
option(ENABLE_CHANNELRX_FILESINK "Enable channelrx filesink plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODFREEDV "Enable channelrx demodfreedv plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODCHIRPCHAT "Enable channelrx demodchirpchat plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_REMOTESINK "Enable channelrx remotesink plugin" ON)
|
2022-07-19 09:10:20 +00:00
|
|
|
option(ENABLE_CHANNELRX_REMOTETCPSINK "Enable channelrx remotetcpsink plugin" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
option(ENABLE_CHANNELRX_DEMODSSB "Enable channelrx demodssb plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_CHANALYZER "Enable channelrx chanalyzer plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_SIGMFFILESINK "Enable channelrx sigmffilesink plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODBFM "Enable channelrx demodbfm plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODWFM "Enable channelrx demodwfm plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_NOISEFIGURE "Enable channelrx noisefigure plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODVOR "Enable channelrx demodvor plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_LOCALSINK "Enable channelrx localsink plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODPACKET "Enable channelrx demodpacket plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODAPT "Enable channelrx demodapt plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODDSD "Enable channelrx demoddsd plugin" ON)
|
2023-01-15 00:22:57 +00:00
|
|
|
option(ENABLE_CHANNELRX_DEMODFT8 "Enable channelrx demodft8 plugin" ON)
|
2023-03-03 16:37:38 +00:00
|
|
|
option(ENABLE_CHANNELRX_DEMODNAVTEX "Enable channelrx demodnavtex plugin" ON)
|
|
|
|
option(ENABLE_CHANNELRX_DEMODRTTY "Enable channelrx demodrtty plugin" ON)
|
2023-03-21 10:54:42 +00:00
|
|
|
option(ENABLE_CHANNELRX_DEMODILS "Enable channelrx demodils plugin" ON)
|
2023-05-15 15:40:43 +00:00
|
|
|
option(ENABLE_CHANNELRX_DEMODDSC "Enable channelrx demoddsc plugin" ON)
|
2023-07-29 11:33:38 +00:00
|
|
|
option(ENABLE_CHANNELRX_HEATMAP "Enable channelrx heatmap plugin" ON)
|
2023-09-28 15:45:35 +00:00
|
|
|
option(ENABLE_CHANNELRX_FREQSCANNER "Enable channelrx freqscanner plugin" ON)
|
2024-03-03 13:40:42 +00:00
|
|
|
option(ENABLE_CHANNELRX_ENDOFTRAIN "Enable channelrx end-of-train plugin" ON)
|
2024-03-13 15:52:45 +00:00
|
|
|
option(ENABLE_CHANNELRX_CHANNELPOWER "Enable channelrx channel power plugin" ON)
|
2024-06-20 22:44:17 +00:00
|
|
|
option(ENABLE_CHANNELRX_WDSPRX "Enable channelrx WDSP receiver plugin" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
|
|
|
|
# Channel Tx enablers
|
2022-06-25 21:11:55 +00:00
|
|
|
option(ENABLE_CHANNELTX "Enable channeltx plugins" ON)
|
2022-06-30 02:32:00 +00:00
|
|
|
option(ENABLE_CHANNELTX_MODM17 "Enable channeltx modm17 plugin" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
option(ENABLE_CHANNELTX_MODNFM "Enable channeltx modnfm plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MODAIS "Enable channeltx modais plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_LOCALSOURCE "Enable channeltx localsource plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MODDATV "Enable channeltx moddatv plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MODAM "Enable channeltx modam plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MODFREEDV "Enable channeltx modfreedv plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MODPACKET "Enable channeltx modpacket plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MODSSB "Enable channeltx modssb plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_UDPSOURCE "Enable channeltx udpsource plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MODCHIRPCHAT "Enable channeltx modchirpchat plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MODWFM "Enable channeltx modwfm plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MODATV "Enable channeltx modatv plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_MOD802.15.4 "Enable channeltx mod802.15.4 plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_REMOTESOURCE "Enable channeltx remotesource plugin" ON)
|
|
|
|
option(ENABLE_CHANNELTX_FILESOURCE "Enable channeltx filesource plugin" ON)
|
2023-09-01 16:10:26 +00:00
|
|
|
option(ENABLE_CHANNELTX_MODRTTY "Enable channeltx modrtty plugin" ON)
|
2023-09-06 14:21:22 +00:00
|
|
|
option(ENABLE_CHANNELTX_MODPSK31 "Enable channeltx modpsk31 plugin" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
|
|
|
|
# Channel MIMO enablers
|
2022-08-13 09:51:15 +00:00
|
|
|
option(ENABLE_CHANNELMIMO "Enable channelmimo plugins" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
option(ENABLE_CHANNELMIMO_INTERFEROMETER "Enable channelmimo interferometer plugin" ON)
|
|
|
|
option(ENABLE_CHANNELMIMO_DOA2 "Enable channelmimo doa2 plugin" ON)
|
|
|
|
option(ENABLE_CHANNELMIMO_BEAMSTEERINGCWMOD "Enable channelmimo beamsteeringcwmod plugin" ON)
|
|
|
|
|
|
|
|
# Feature enablers
|
2022-06-25 21:11:55 +00:00
|
|
|
option(ENABLE_FEATURE "Enable feature plugins" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
option(ENABLE_FEATURE_LIMERFE "Enable feature limerfe plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_VORLOCALIZER "Enable feature vorlocalizer plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_JOGDIALCONTROLLER "Enable feature jogdialcontroller plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_MAP "Enable feature map plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_SIMPLEPTT "Enable feature simpleptt plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_RADIOSONDE "Enable feature radiosonde plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_ANTENNATOOLS "Enable feature antennatools plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_SATELLITETRACKER "Enable feature satellitetracker plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_APRS "Enable feature aprs plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_DEMODANALYZER "Enable feature demodanalyzer plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_AMBE "Enable feature ambe plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_AIS "Enable feature ais plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_AFC "Enable feature afc plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_STARTRACKER "Enable feature startracker plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_RIGCTLSERVER "Enable feature rigctlserver plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_PERTESTER "Enable feature pertester plugin" ON)
|
|
|
|
option(ENABLE_FEATURE_GS232CONTROLLER "Enable feature gs232controller plugin" ON)
|
2022-09-16 09:20:16 +00:00
|
|
|
option(ENABLE_FEATURE_REMOTECONTROL "Enable feature remote control plugin" ON)
|
2024-02-14 13:20:33 +00:00
|
|
|
option(ENABLE_FEATURE_SKYMAP "Enable feature sky map plugin" ON)
|
2024-04-02 15:13:01 +00:00
|
|
|
option(ENABLE_FEATURE_SID "Enable feature sid plugin" ON)
|
2024-05-15 09:38:25 +00:00
|
|
|
option(ENABLE_FEATURE_MORSEDECODER "Enable feature morsedecoder plugin" ON)
|
2022-06-25 09:56:45 +00:00
|
|
|
|
2019-05-23 14:01:06 +00:00
|
|
|
# on windows always build external libraries
|
|
|
|
if(WIN32)
|
2019-06-26 15:50:45 +00:00
|
|
|
set(ENABLE_EXTERNAL_LIBRARIES ON CACHE BOOL "Build external libraries" FORCE)
|
2019-06-24 16:25:53 +00:00
|
|
|
# to run fixup_bundle()
|
2019-06-26 15:50:45 +00:00
|
|
|
set(BUNDLE ON CACHE BOOL "Enable distribution bundle" FORCE)
|
2019-05-23 14:01:06 +00:00
|
|
|
endif()
|
2019-05-04 12:26:19 +00:00
|
|
|
|
2019-05-03 15:46:01 +00:00
|
|
|
# Set additional project information
|
|
|
|
set(COMPANY "f4exb")
|
|
|
|
add_definitions("-DCOMPANY=\"${COMPANY}\"")
|
|
|
|
set(APPLICATION_NAME "SDRangel")
|
|
|
|
add_definitions("-DAPPLICATION_NAME=\"${APPLICATION_NAME}\"")
|
2019-05-04 11:46:03 +00:00
|
|
|
set(APPLICATION_MAINTAINER="Edouard Griffiths, F4EXB <f4exb06@gmail.com>")
|
2019-05-03 15:46:01 +00:00
|
|
|
set(COPYRIGHT "Copyright (c) 2019 Edouard Griffiths. All rights reserved.")
|
|
|
|
add_definitions("-DCOPYRIGHT=\"${COPYRIGHT}\"")
|
|
|
|
set(IDENTIFIER "com.${COMPANY}.${APPLICATION_NAME}")
|
|
|
|
add_definitions("-DIDENTIFIER=\"${IDENTIFIER}\"")
|
2019-05-02 09:03:40 +00:00
|
|
|
|
|
|
|
find_package(Git)
|
2019-05-03 15:46:01 +00:00
|
|
|
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/")
|
2019-05-22 07:52:36 +00:00
|
|
|
execute_process(COMMAND "${GIT_EXECUTABLE}" describe --tags
|
2019-05-03 15:46:01 +00:00
|
|
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
|
|
|
RESULT_VARIABLE res
|
|
|
|
OUTPUT_VARIABLE out
|
|
|
|
ERROR_QUIET
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
|
|
if(NOT res)
|
2019-06-09 20:21:49 +00:00
|
|
|
string(REGEX REPLACE "^v([0-9]+)\.([0-9]+)\.([0-9]+)" "" git_commit ${out})
|
|
|
|
set(sdrangel_VERSION_SUFFIX "${git_commit}")
|
2019-05-02 09:03:40 +00:00
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2024-01-30 12:41:44 +00:00
|
|
|
find_program(CCACHE "ccache")
|
|
|
|
if(CCACHE)
|
2024-02-18 10:56:40 +00:00
|
|
|
message(STATUS "Using ccache ${CCACHE}")
|
2024-01-30 12:41:44 +00:00
|
|
|
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE})
|
|
|
|
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE})
|
|
|
|
if(APPLE)
|
|
|
|
set(CMAKE_OBJCXX_COMPILER_LAUNCHER ${CCACHE})
|
|
|
|
endif()
|
|
|
|
set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros)
|
|
|
|
endif(CCACHE)
|
|
|
|
|
2023-09-24 13:55:56 +00:00
|
|
|
set(sdrangel_VERSION "${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}${sdrangel_VERSION_SUFFIX}" CACHE INTERNAL "")
|
2019-05-03 15:46:01 +00:00
|
|
|
message(STATUS "${APPLICATION_NAME} Version: ${sdrangel_VERSION}")
|
|
|
|
add_definitions("-DSDRANGEL_LIB_VERSION=\"${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}\"")
|
|
|
|
add_definitions("-DSDRANGEL_VERSION=\"${sdrangel_VERSION}\"")
|
|
|
|
|
2019-07-22 21:14:23 +00:00
|
|
|
# configure CPACK information
|
2019-05-04 12:26:19 +00:00
|
|
|
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
|
2021-04-11 20:21:36 +00:00
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "SDR Rx/Tx software for Airspy, Airspy HF+, BladeRF, HackRF, LimeSDR, PlutoSDR, RTL-SDR, SDRplay, USRP and FunCube")
|
2019-05-03 15:46:01 +00:00
|
|
|
set(CPACK_PACKAGE_VENDOR "${COMPANY}")
|
|
|
|
set(CPACK_PACKAGE_CONTACT "https://github.com/f4exb/sdrangel")
|
|
|
|
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/Readme.md")
|
2020-02-28 15:12:41 +00:00
|
|
|
set(CPACK_PACKAGE_VERSION "${sdrangel_VERSION_MAJOR}.${sdrangel_VERSION_MINOR}.${sdrangel_VERSION_PATCH}${sdrangel_VERSION_SUFFIX}")
|
2019-05-03 15:46:01 +00:00
|
|
|
set(CPACK_PACKAGE_VERSION_MAJOR ${sdrangel_VERSION_MAJOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_MINOR ${sdrangel_VERSION_MINOR})
|
|
|
|
set(CPACK_PACKAGE_VERSION_PATCH ${sdrangel_VERSION_PATCH})
|
|
|
|
set(CPACK_SOURCE_STRIP_FILES true)
|
|
|
|
set(CPACK_STRIP_FILES true)
|
|
|
|
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
|
|
|
|
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/Readme.md")
|
|
|
|
set(CPACK_SOURCE_IGNORE_FILES "${PROJECT_BINARY_DIR};/.git/;.gitignore;menu.yml;.travis.yml;.appveyor.yml;default.nix;.envrc;TODOs.org;/.scripts/")
|
|
|
|
set(CPACK_SOURCE_GENERATOR "ZIP;TGZ")
|
2016-02-24 10:51:36 +00:00
|
|
|
|
2019-05-01 17:16:37 +00:00
|
|
|
# if we don't set build_type
|
2019-05-24 06:32:40 +00:00
|
|
|
if(NOT DEFINED CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" STREQUAL "")
|
|
|
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
|
2019-05-01 17:16:37 +00:00
|
|
|
endif()
|
2019-05-18 09:20:50 +00:00
|
|
|
message(STATUS "Build type set to: ${CMAKE_BUILD_TYPE}")
|
2019-05-01 17:16:37 +00:00
|
|
|
|
|
|
|
# as default disable qDebug()
|
2019-05-01 09:54:58 +00:00
|
|
|
if(NOT DEBUG_OUTPUT)
|
2019-05-03 15:46:01 +00:00
|
|
|
add_definitions("-DQT_NO_DEBUG_OUTPUT")
|
2019-05-01 09:54:58 +00:00
|
|
|
endif()
|
2014-11-05 12:34:33 +00:00
|
|
|
|
2019-05-01 17:16:37 +00:00
|
|
|
# declare build structures
|
2019-05-24 06:32:40 +00:00
|
|
|
# !! change sdrbase/plugins/pluginmanager.cpp too !!
|
2022-01-26 00:00:49 +00:00
|
|
|
add_definitions("-DLIB=\"lib${LIB_SUFFIX}\"")
|
2019-05-24 06:32:40 +00:00
|
|
|
set(SDRANGEL_BINARY_BIN_DIR "${CMAKE_BINARY_DIR}/bin")
|
2022-01-26 00:00:49 +00:00
|
|
|
set(SDRANGEL_BINARY_LIB_DIR "${CMAKE_BINARY_DIR}/lib${LIB_SUFFIX}")
|
2019-05-02 14:04:43 +00:00
|
|
|
if(WIN32)
|
2019-05-24 06:32:40 +00:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${SDRANGEL_BINARY_BIN_DIR}")
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
2020-07-20 04:11:27 +00:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
|
2019-05-02 14:04:43 +00:00
|
|
|
else()
|
2019-05-07 17:36:47 +00:00
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")
|
2019-05-02 14:04:43 +00:00
|
|
|
endif()
|
2019-05-24 06:32:40 +00:00
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${SDRANGEL_BINARY_LIB_DIR}")
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${SDRANGEL_BINARY_LIB_DIR}")
|
|
|
|
if(WIN32)
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
|
2020-07-20 04:11:27 +00:00
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}")
|
2019-05-24 06:32:40 +00:00
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
|
2020-07-20 04:11:27 +00:00
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
|
2019-05-24 06:32:40 +00:00
|
|
|
set(BUILD_PLUGINS_RUNTIME_DIR "${SDRANGEL_BINARY_BIN_DIR}/plugins")
|
|
|
|
set(BUILD_PLUGINSSRV_RUNTIME_DIR "${SDRANGEL_BINARY_BIN_DIR}/pluginssrv")
|
|
|
|
endif()
|
2019-05-08 09:27:57 +00:00
|
|
|
set(BUILD_PLUGINS_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/plugins")
|
|
|
|
set(BUILD_PLUGINSSRV_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pluginssrv")
|
2019-05-03 15:46:01 +00:00
|
|
|
# use only lib when create .app/.dmg
|
|
|
|
if(APPLE AND BUNDLE AND BUILD_GUI)
|
2019-05-07 17:36:47 +00:00
|
|
|
set(INSTALL_BIN_DIR ".")
|
2019-05-03 15:46:01 +00:00
|
|
|
set(INSTALL_LIB_DIR "lib")
|
2019-05-06 12:09:28 +00:00
|
|
|
set(INSTALL_DOC_DIR "doc")
|
2019-06-24 16:25:53 +00:00
|
|
|
elseif(WIN32)
|
|
|
|
# used to create package
|
|
|
|
set(INSTALL_BIN_DIR ".")
|
|
|
|
set(INSTALL_LIB_DIR ".")
|
|
|
|
set(INSTALL_DOC_DIR ".")
|
2019-05-03 15:46:01 +00:00
|
|
|
else()
|
2019-05-07 17:36:47 +00:00
|
|
|
set(INSTALL_BIN_DIR "bin")
|
2022-01-26 00:00:49 +00:00
|
|
|
set(INSTALL_LIB_DIR "lib${LIB_SUFFIX}/${CMAKE_PROJECT_NAME}")
|
2019-05-06 12:09:28 +00:00
|
|
|
set(INSTALL_DOC_DIR "share/${CMAKE_PROJECT_NAME}")
|
2019-05-03 15:46:01 +00:00
|
|
|
endif()
|
2019-05-07 17:36:47 +00:00
|
|
|
set(INSTALL_PLUGINS_DIR "${INSTALL_LIB_DIR}/plugins")
|
|
|
|
set(INSTALL_PLUGINSSRV_DIR "${INSTALL_LIB_DIR}/pluginssrv")
|
2019-05-23 14:01:06 +00:00
|
|
|
set(EXTERNAL_BUILD_LIBRARIES "${CMAKE_BINARY_DIR}/external")
|
2019-05-01 17:16:37 +00:00
|
|
|
|
2019-05-27 14:51:15 +00:00
|
|
|
# custom libraries
|
|
|
|
set(CUSTOM_APPLE_INCLUDE "${CMAKE_SOURCE_DIR}/custom/apple" CACHE INTERNAL "")
|
|
|
|
set(CUSTOM_WINDOWS_INCLUDE "${CMAKE_SOURCE_DIR}/custom/windows" CACHE INTERNAL "")
|
|
|
|
|
2019-05-04 12:26:19 +00:00
|
|
|
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
|
|
|
|
set(LINUX TRUE)
|
2021-03-07 06:41:19 +00:00
|
|
|
add_definitions(-DLINUX)
|
2019-05-04 12:26:19 +00:00
|
|
|
# populate distribution name
|
2019-05-08 09:27:57 +00:00
|
|
|
# LSB_CODENAME will hold trusty for example
|
2019-05-04 12:26:19 +00:00
|
|
|
find_program(LSB_RELEASE_EXECUTABLE lsb_release)
|
|
|
|
if(LSB_RELEASE_EXECUTABLE)
|
|
|
|
execute_process(COMMAND ${LSB_RELEASE_EXECUTABLE} -cs
|
|
|
|
OUTPUT_VARIABLE LSB_CODENAME
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
|
|
|
endif()
|
2019-05-07 17:36:47 +00:00
|
|
|
configure_file("${CMAKE_SOURCE_DIR}/cmake/cpack/${CMAKE_PROJECT_NAME}.desktop.in"
|
2019-05-06 12:09:28 +00:00
|
|
|
"${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.desktop" @ONLY)
|
2023-01-12 16:29:24 +00:00
|
|
|
set(FFTW3F_FOUND ON CACHE INTERNAL "")
|
2019-05-04 12:26:19 +00:00
|
|
|
elseif(APPLE)
|
2019-05-23 14:01:06 +00:00
|
|
|
if("${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
|
|
|
|
message(STATUS "Build for macOS target: local version")
|
|
|
|
else()
|
|
|
|
message(STATUS "Build for macOS target: ${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
|
|
|
endif()
|
2019-05-08 09:27:57 +00:00
|
|
|
|
2019-05-11 09:31:39 +00:00
|
|
|
# prepend path to find_*()
|
|
|
|
set(CMAKE_FIND_ROOT_PATH "/opt/local")
|
|
|
|
|
2019-05-03 15:46:01 +00:00
|
|
|
set(CMAKE_MACOSX_RPATH ON)
|
2019-05-08 09:27:57 +00:00
|
|
|
message(STATUS "RPATH support: ${CMAKE_MACOSX_RPATH}")
|
|
|
|
|
2019-05-07 17:36:47 +00:00
|
|
|
configure_file("${CMAKE_SOURCE_DIR}/cmake/cpack/MacOSXBundleInfo.plist.in"
|
2019-05-06 12:09:28 +00:00
|
|
|
"${CMAKE_BINARY_DIR}/Info.plist" @ONLY)
|
2019-05-04 12:26:19 +00:00
|
|
|
elseif (WIN32)
|
2019-06-25 17:08:02 +00:00
|
|
|
# check compiler version
|
2021-06-14 20:32:53 +00:00
|
|
|
message(STATUS "MSVC_VERSION is ${MSVC_VERSION}")
|
2024-06-10 02:07:58 +00:00
|
|
|
if(MSVC_VERSION GREATER_EQUAL 1930)
|
2022-02-05 11:17:46 +00:00
|
|
|
set(VS2022 ON)
|
|
|
|
elseif(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS 1930)
|
2020-11-01 12:03:13 +00:00
|
|
|
set(VS2019 ON)
|
2022-02-05 11:17:46 +00:00
|
|
|
elseif(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1919)
|
2019-06-25 17:08:02 +00:00
|
|
|
set(VS2017 ON)
|
2022-02-05 11:17:46 +00:00
|
|
|
elseif(MSVC_VERSION GREATER_EQUAL 1900 AND MSVC_VERSION LESS 1910)
|
2019-06-25 17:08:02 +00:00
|
|
|
set(VS2015 ON)
|
|
|
|
endif()
|
|
|
|
|
2022-02-05 11:04:34 +00:00
|
|
|
if(NOT VS2015 AND NOT VS2017 AND NOT VS2019 AND NOT VS2022)
|
|
|
|
message(FATAL_ERROR "You must use Microsoft Visual Studio 2015, 2017, 2019 or greater as compiler")
|
2019-05-24 06:32:40 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# in alternative we can use ExternalProject
|
2019-05-03 15:46:01 +00:00
|
|
|
set(EXTERNAL_LIBRARY_FOLDER "${CMAKE_SOURCE_DIR}/external/windows")
|
2019-05-23 14:01:06 +00:00
|
|
|
set(FFTW3F_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(FFTW3F_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/include" CACHE INTERNAL "")
|
2019-05-24 06:32:40 +00:00
|
|
|
set(FFTW3F_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/libfftw3f-3.lib" CACHE INTERNAL "")
|
2021-11-04 04:25:14 +00:00
|
|
|
set(FFTW3F_WISDOM "${EXTERNAL_LIBRARY_FOLDER}/fftw-3/fftwf-wisdom.exe" CACHE INTERNAL "")
|
2023-02-01 14:18:59 +00:00
|
|
|
set(FFTW3F_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/fftw-3" CACHE INTERNAL "")
|
|
|
|
|
2022-05-29 20:26:04 +00:00
|
|
|
set(LIBUSB_FOUND ON CACHE INTERNAL "")
|
2019-05-23 14:01:06 +00:00
|
|
|
set(LIBUSB_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/libusb/include" CACHE INTERNAL "")
|
2019-05-24 06:32:40 +00:00
|
|
|
set(LIBUSB_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll/libusb-1.0.lib" CACHE INTERNAL "")
|
2023-02-01 14:18:59 +00:00
|
|
|
set(LIBUSB_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll" CACHE INTERNAL "")
|
|
|
|
|
|
|
|
if(VS2019)
|
2020-11-01 12:03:13 +00:00
|
|
|
set(OpenCV_DIR "${EXTERNAL_LIBRARY_FOLDER}/opencv4" CACHE INTERNAL "")
|
|
|
|
else()
|
|
|
|
set(OpenCV_DIR "${EXTERNAL_LIBRARY_FOLDER}/opencv" CACHE INTERNAL "")
|
|
|
|
endif()
|
2019-05-23 14:01:06 +00:00
|
|
|
set(PKG_CONFIG_EXECUTABLE "${EXTERNAL_LIBRARY_FOLDER}/pkg-config-lite/bin/pkg-config.exe" CACHE INTERNAL "")
|
2020-09-01 15:02:33 +00:00
|
|
|
set(SOAPYSUPPORT_DIR "${EXTERNAL_LIBRARY_FOLDER}/soapysdr-support" CACHE INTERNAL "")
|
2019-05-24 06:32:40 +00:00
|
|
|
|
2020-08-29 17:12:56 +00:00
|
|
|
set(CODEC2_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(CODEC2_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/codec2/include" CACHE INTERNAL "")
|
|
|
|
set(CODEC2_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/codec2/lib/codec2.lib" CACHE INTERNAL "")
|
|
|
|
set(CODEC2_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/codec2/lib" CACHE INTERNAL "")
|
|
|
|
|
2020-10-02 21:45:28 +00:00
|
|
|
set(UHD_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(UHD_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/uhd/include" CACHE INTERNAL "")
|
|
|
|
set(UHD_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/uhd/lib/uhd.lib" CACHE INTERNAL "")
|
|
|
|
set(UHD_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/uhd/bin" CACHE INTERNAL "")
|
|
|
|
|
2021-04-16 21:56:15 +00:00
|
|
|
set(DAB_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(DAB_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/dab" CACHE INTERNAL "")
|
|
|
|
set(DAB_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/dab/dab_lib.lib" CACHE INTERNAL "")
|
|
|
|
set(DAB_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/dab" CACHE INTERNAL "")
|
|
|
|
|
2020-10-27 16:22:10 +00:00
|
|
|
set(OPENSSL_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(OPENSSL_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/openssl" CACHE INTERNAL "")
|
|
|
|
|
2019-05-24 06:32:40 +00:00
|
|
|
# ffmpeg
|
|
|
|
set(FFMPEG_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/include" CACHE INTERNAL "")
|
2019-06-25 17:08:02 +00:00
|
|
|
set(FFMPEG_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/bin" CACHE INTERNAL "")
|
2019-05-24 06:32:40 +00:00
|
|
|
set(AVCODEC_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(AVCODEC_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/lib/avcodec.lib" CACHE INTERNAL "")
|
|
|
|
set(AVFORMAT_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(AVFORMAT_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/lib/avformat.lib" CACHE INTERNAL "")
|
|
|
|
set(AVUTIL_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(AVUTIL_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/lib/avutil.lib" CACHE INTERNAL "")
|
|
|
|
set(SWRESAMPLE_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(SWRESAMPLE_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/lib/swresample.lib" CACHE INTERNAL "")
|
|
|
|
set(SWSCALE_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(SWSCALE_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/lib/swscale.lib" CACHE INTERNAL "")
|
|
|
|
|
2019-07-06 03:10:58 +00:00
|
|
|
# LimeSuite FX3 support
|
|
|
|
set(FX3SDK_DIR "${EXTERNAL_LIBRARY_FOLDER}/FX3SDK" CACHE INTERNAL "")
|
|
|
|
|
2021-04-11 20:21:36 +00:00
|
|
|
set(SDRPLAY_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(SDRPLAY_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/sdrplay/inc" CACHE INTERNAL "")
|
|
|
|
set(SDRPLAY_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/sdrplay/x64/sdrplay_api.lib" CACHE INTERNAL "")
|
|
|
|
set(SDRPLAY_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/sdrplay/x64/" CACHE INTERNAL "")
|
|
|
|
|
2021-04-16 21:56:15 +00:00
|
|
|
set(FAAD_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(FAAD_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/faad2/include" CACHE INTERNAL "")
|
|
|
|
set(FAAD_LIBRARY "${EXTERNAL_LIBRARY_FOLDER}/faad2/lib/libfaad.lib" CACHE INTERNAL "")
|
|
|
|
|
|
|
|
set(ZLIB_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(ZLIB_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/zlib/include" CACHE INTERNAL "")
|
|
|
|
set(ZLIB_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/zlib/lib/zlibstaticd.lib" CACHE INTERNAL "")
|
|
|
|
|
2022-05-29 20:26:04 +00:00
|
|
|
set(HIDAPI_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(HIDAPI_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/hidapi/include" CACHE INTERNAL "")
|
|
|
|
set(HIDAPI_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/hidapi/x64/hidapi.lib" CACHE INTERNAL "")
|
2022-05-30 15:04:21 +00:00
|
|
|
set(HIDAPI_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/hidapi/x64" CACHE INTERNAL "")
|
2022-05-29 20:26:04 +00:00
|
|
|
|
2023-05-26 07:28:12 +00:00
|
|
|
set(LIBSIGMF_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(LIBSIGMF_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/libsigmf/include" CACHE INTERNAL "")
|
|
|
|
set(LIBSIGMF_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/libsigmf/lib/libsigmf.lib" DbgHelp CACHE INTERNAL "")
|
|
|
|
set(LIBSIGMF_LIBRARIES_DEBUG "${EXTERNAL_LIBRARY_FOLDER}/libsigmf/lib/libsigmfd.lib" DbgHelp CACHE INTERNAL "")
|
|
|
|
set(LIBSIGMF_DLL_DIR "${EXTERNAL_LIBRARY_FOLDER}/libsigmf/lib/" CACHE INTERNAL "")
|
|
|
|
|
2024-02-27 15:44:31 +00:00
|
|
|
set(LIBACARS_FOUND ON CACHE INTERNAL "")
|
|
|
|
set(LIBACARS_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/libacars/include/libacars-2" CACHE INTERNAL "")
|
|
|
|
set(LIBACARS_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/libacars/lib/acars-2.lib" CACHE INTERNAL "")
|
|
|
|
|
2019-05-24 06:32:40 +00:00
|
|
|
# used on fixup_bundle phase
|
|
|
|
set(WINDOWS_FIXUP_BUNDLE_LIB_DIRS
|
|
|
|
"${EXTERNAL_LIBRARY_FOLDER}/fftw-3"
|
|
|
|
"${EXTERNAL_LIBRARY_FOLDER}/libusb/MS64/dll"
|
|
|
|
"${EXTERNAL_LIBRARY_FOLDER}/ffmpeg/bin"
|
2023-05-26 07:28:12 +00:00
|
|
|
"${EXTERNAL_LIBRARY_FOLDER}/libsigmf/lib"
|
2019-05-24 06:32:40 +00:00
|
|
|
)
|
2022-12-20 22:07:49 +00:00
|
|
|
elseif(ANDROID)
|
|
|
|
set(EXTERNAL_LIBRARY_FOLDER "${CMAKE_SOURCE_DIR}/external/android")
|
|
|
|
|
2023-01-02 15:28:52 +00:00
|
|
|
set(Boost_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/ndk_21_boost_1.72.0/include" CACHE INTERNAL "")
|
|
|
|
|
2022-12-20 22:07:49 +00:00
|
|
|
set(FFTW3F_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(FFTW3F_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/fftw-3/include" CACHE INTERNAL "")
|
|
|
|
set(FFTW3F_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/fftw-3/lib/libfftw3f.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(OPUS_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(OPUS_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/libopus/include" CACHE INTERNAL "")
|
|
|
|
set(OPUS_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/libopus/lib/libopus.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(CODEC2_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(CODEC2_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/codec2/include" CACHE INTERNAL "")
|
|
|
|
set(CODEC2_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/codec2/lib/libcodec2.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(APT_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(APT_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/aptdec/include/apt" CACHE INTERNAL "")
|
|
|
|
set(APT_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/aptdec/lib/libaptstatic.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(SGP4_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(SGP4_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/sgp4/include/libsgp4" CACHE INTERNAL "")
|
|
|
|
set(SGP4_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/sgp4/lib/libsgp4.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(ZLIB_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(ZLIB_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/zlib/include" CACHE INTERNAL "")
|
|
|
|
set(ZLIB_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/zlib/lib/libz.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(FAAD_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(FAAD_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/faad2/include" CACHE INTERNAL "")
|
|
|
|
set(FAAD_LIBRARY "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/faad2/lib/liblibfaadstatic.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(DAB_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(DAB_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/libdab/include/dab_lib" CACHE INTERNAL "")
|
|
|
|
set(DAB_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/libdab/lib/libdab_lib.so" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(LIBMBE_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(LIBMBE_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/mbelib/include/" CACHE INTERNAL "")
|
|
|
|
set(LIBMBE_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/mbelib/lib/libmbe.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(LIBDSDCC_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(LIBDSDCC_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/dsdcc/include/" CACHE INTERNAL "")
|
|
|
|
set(LIBDSDCC_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/dsdcc/lib/libdsdcc.so" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(FFMPEG_FOUND ON CACHE INTERNAL "")
|
2024-04-21 11:36:38 +00:00
|
|
|
set(FFMPEG_SKIP_CHECK ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(FFMPEG_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(FFMPEG_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/bin" CACHE INTERNAL "")
|
|
|
|
set(AVCODEC_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(AVCODEC_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libavcodec.so" CACHE INTERNAL "")
|
|
|
|
set(AVFORMAT_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(AVFORMAT_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libavformat.so" CACHE INTERNAL "")
|
|
|
|
set(AVUTIL_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(AVUTIL_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libavutil.so" CACHE INTERNAL "")
|
|
|
|
set(SWRESAMPLE_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(SWRESAMPLE_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libswresample.so" CACHE INTERNAL "")
|
|
|
|
set(SWSCALE_INCLUDE_DIRS "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/include" CACHE INTERNAL "")
|
|
|
|
set(SWSCALE_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libswscale.so" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(LIBUSB_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(LIBUSB_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/libusb/include/" CACHE INTERNAL "")
|
|
|
|
set(LIBUSB_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/libusb/lib/libusb1.0.so" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(LIBAIRSPYHF_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(LIBAIRSPYHF_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/airspyhf/include/" CACHE INTERNAL "")
|
|
|
|
set(LIBAIRSPYHF_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/airspyhf/lib/libairspyhf.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(LIBAIRSPY_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(LIBAIRSPY_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/airspy/include/" CACHE INTERNAL "")
|
|
|
|
set(LIBAIRSPY_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/airspy/lib/libairspy.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(LIBRTLSDR_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(LIBRTLSDR_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/librtlsdr/include/" CACHE INTERNAL "")
|
|
|
|
set(LIBRTLSDR_LIBRARIES "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/librtlsdr/lib/librtlsdr.a" CACHE INTERNAL "")
|
2022-12-20 22:07:49 +00:00
|
|
|
|
|
|
|
set(LIMESUITE_FOUND ON CACHE INTERNAL "")
|
2023-01-02 15:28:52 +00:00
|
|
|
set(LIMESUITE_INCLUDE_DIR "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/limesuite/include/" CACHE INTERNAL "")
|
|
|
|
set(LIMESUITE_LIBRARY "${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/limesuite/lib/libLimeSuite.a" CACHE INTERNAL "")
|
|
|
|
|
|
|
|
if (ENABLE_QT6)
|
|
|
|
set(ANDROID_EXTRA_LIBS
|
|
|
|
${Qt6_DIR}/../../../android_arm64_v8a/lib/libQt6Charts_arm64-v8a.so
|
|
|
|
${Qt6_DIR}/../../../android_arm64_v8a/lib/libQt6Concurrent_arm64-v8a.so
|
|
|
|
${Qt6_DIR}/../../../android_arm64_v8a/lib/libQt6MultimediaWidgets_arm64-v8a.so
|
|
|
|
${Qt6_DIR}/../../../android_arm64_v8a/lib/libQt6SerialPort_arm64-v8a.so
|
|
|
|
${Qt6_DIR}/../../../android_arm64_v8a/lib/libQt6TextToSpeech_arm64-v8a.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/android_openssl/latest/arm64/libssl_1_1.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/android_openssl/latest/arm64/libcrypto_1_1.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libavcodec.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libavdevice.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libavfilter.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libavformat.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libavutil.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libswresample.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libswscale.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/ffmpeg/lib/libc++_shared.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/libdab/lib/libdab_lib.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/dsdcc/lib/libdsdcc.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/libusb/lib/libunrooted_android.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/${ANDROID_ABI}/libusb/lib/libusb1.0.so
|
|
|
|
CACHE INTERNAL ""
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
set(ANDROID_EXTRA_LIBS
|
|
|
|
${Qt5_DIR}/plugins/sqldrivers/libplugins_sqldrivers_qsqlite_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/plugins/geoservices/libplugins_geoservices_qtgeoservices_mapboxgl_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Sql_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5SerialPort_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Charts_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Positioning_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5PositioningQuick_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Location_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Concurrent_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5MultimediaWidgets_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5SerialPort_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5TextToSpeech_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5QuickControls2_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5QuickWidgets_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5QuickTemplates2_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5QuickShapes_arm64-v8a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Sql_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5SerialPort_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Charts_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Positioning_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5PositioningQuick_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Location_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5Concurrent_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5MultimediaWidgets_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5SerialPort_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5TextToSpeech_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5QuickControls2_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5QuickWidgets_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5QuickTemplates2_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/lib/libQt5QuickShapes_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/plugins/sqldrivers/libplugins_sqldrivers_qsqlite_armeabi-v7a.so
|
|
|
|
${Qt5_DIR}/plugins/geoservices/libplugins_geoservices_qtgeoservices_mapboxgl_armeabi-v7a.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/android_openssl/latest/arm64/libssl_1_1.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/android_openssl/latest/arm64/libcrypto_1_1.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/ffmpeg/lib/libavcodec.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/ffmpeg/lib/libavdevice.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/ffmpeg/lib/libavfilter.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/ffmpeg/lib/libavformat.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/ffmpeg/lib/libavutil.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/ffmpeg/lib/libswresample.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/ffmpeg/lib/libswscale.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/ffmpeg/lib/libc++_shared.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/libdab/lib/libdab_lib.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/dsdcc/lib/libdsdcc.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/libusb/lib/libunrooted_android.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/arm64-v8a/libusb/lib/libusb1.0.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/ffmpeg/lib/libavcodec.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/ffmpeg/lib/libavdevice.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/ffmpeg/lib/libavfilter.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/ffmpeg/lib/libavformat.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/ffmpeg/lib/libavutil.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/ffmpeg/lib/libswresample.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/ffmpeg/lib/libswscale.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/ffmpeg/lib/libc++_shared.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/libdab/lib/libdab_lib.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/dsdcc/lib/libdsdcc.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/libusb/lib/libunrooted_android.so
|
|
|
|
${EXTERNAL_LIBRARY_FOLDER}/armeabi-v7a/libusb/lib/libusb1.0.so
|
|
|
|
CACHE INTERNAL ""
|
|
|
|
)
|
|
|
|
endif()
|
2019-05-02 14:56:07 +00:00
|
|
|
endif()
|
2019-05-01 17:16:37 +00:00
|
|
|
|
2022-05-16 12:48:29 +00:00
|
|
|
# When building a bundle on MacOS, we want to keep build paths in the library
|
|
|
|
# so macdeployqt can find them. The following code is only for installing
|
|
|
|
if (NOT BUNDLE)
|
|
|
|
# TODO: check if(DEFINED) and fix macports -D
|
|
|
|
# fix install path
|
|
|
|
set(CMAKE_INSTALL_RPATH
|
|
|
|
"${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}" CACHE
|
|
|
|
PATH "Library Install RPath" FORCE)
|
|
|
|
# Allow RPATH to files outside the build tree
|
|
|
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
|
|
# force full path
|
|
|
|
set(CMAKE_INSTALL_NAME_DIR
|
|
|
|
"${CMAKE_INSTALL_PREFIX}/${INSTALL_LIB_DIR}" CACHE
|
|
|
|
PATH "Library Install Name Destination Directory" FORCE)
|
|
|
|
endif()
|
2019-05-09 12:40:27 +00:00
|
|
|
|
2019-05-02 19:34:25 +00:00
|
|
|
# enable 24 bit receiving path
|
|
|
|
if (RX_SAMPLE_24BIT)
|
|
|
|
message(STATUS "Compiling for 24 bit Rx DSP chain")
|
2020-11-09 02:33:18 +00:00
|
|
|
add_compile_definitions(SDR_RX_SAMPLE_24BIT)
|
2019-05-02 19:34:25 +00:00
|
|
|
else()
|
|
|
|
message(STATUS "Compiling for 16 bit Rx DSP chain")
|
|
|
|
endif()
|
|
|
|
|
2023-08-13 22:52:57 +00:00
|
|
|
if (ENABLE_PROFILER)
|
|
|
|
add_compile_definitions(ENABLE_PROFILER)
|
|
|
|
endif()
|
|
|
|
|
2020-11-20 13:26:15 +00:00
|
|
|
# Set compiler options based on target architecture and selected extensions
|
|
|
|
include(CompilerOptions)
|
2014-05-18 15:52:39 +00:00
|
|
|
|
2019-05-01 09:54:58 +00:00
|
|
|
# Instruct CMake to run moc automatically when needed
|
2014-05-18 15:52:39 +00:00
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
2019-05-01 09:54:58 +00:00
|
|
|
# Create code from a list of Qt designer ui files
|
|
|
|
set(CMAKE_AUTOUIC ON)
|
|
|
|
|
|
|
|
# https://cmake.org/cmake/help/v3.0/manual/cmake-qt.7.html#autorcc
|
|
|
|
set(CMAKE_AUTORCC TRUE)
|
|
|
|
|
|
|
|
# As moc files are generated in the binary dir,
|
|
|
|
# tell CMake to always look for includes there:
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
# Qt requirements
|
2022-11-17 14:34:54 +00:00
|
|
|
# See: https://doc-snapshots.qt.io/qt6-dev/cmake-qt5-and-qt6-compatibility.html
|
|
|
|
if(ENABLE_QT6)
|
|
|
|
find_package(Qt6
|
|
|
|
COMPONENTS
|
|
|
|
Core
|
|
|
|
Widgets
|
|
|
|
WebSockets
|
|
|
|
Multimedia
|
|
|
|
MultimediaWidgets
|
|
|
|
Positioning
|
|
|
|
Charts
|
|
|
|
SerialPort
|
|
|
|
Core5Compat)
|
|
|
|
else()
|
|
|
|
find_package(Qt5 5.15
|
|
|
|
REQUIRED COMPONENTS
|
|
|
|
Core
|
|
|
|
Widgets
|
|
|
|
WebSockets
|
|
|
|
Multimedia
|
|
|
|
MultimediaWidgets
|
|
|
|
Positioning
|
|
|
|
Charts
|
2023-04-23 18:56:41 +00:00
|
|
|
SerialPort)
|
2022-11-17 14:34:54 +00:00
|
|
|
endif()
|
2019-05-01 09:54:58 +00:00
|
|
|
|
2020-10-27 16:22:10 +00:00
|
|
|
# for the server we don't need OpenGL/Qt Quick components
|
2019-05-01 09:54:58 +00:00
|
|
|
if (BUILD_GUI)
|
2022-12-20 22:07:49 +00:00
|
|
|
if(ANDROID)
|
|
|
|
# WebEngine not supported on Android
|
|
|
|
if (ENABLE_QT6)
|
|
|
|
find_package(Qt6
|
|
|
|
REQUIRED COMPONENTS
|
|
|
|
OpenGL
|
|
|
|
OpenGLWidgets
|
|
|
|
Quick
|
|
|
|
QuickWidgets
|
|
|
|
TextToSpeech
|
2024-02-27 15:44:31 +00:00
|
|
|
Svg
|
|
|
|
SvgWidgets)
|
2022-12-20 22:07:49 +00:00
|
|
|
else()
|
|
|
|
find_package(Qt5
|
|
|
|
REQUIRED COMPONENTS
|
|
|
|
OpenGL
|
|
|
|
Quick
|
|
|
|
QuickWidgets
|
|
|
|
Location
|
|
|
|
TextToSpeech
|
|
|
|
Svg
|
2023-04-24 12:16:20 +00:00
|
|
|
AndroidExtras
|
|
|
|
OPTIONAL_COMPONENTS
|
|
|
|
Gamepad)
|
2022-12-20 22:07:49 +00:00
|
|
|
endif()
|
2022-11-17 14:34:54 +00:00
|
|
|
else()
|
2022-12-20 22:07:49 +00:00
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
if (ENABLE_QT6)
|
|
|
|
find_package(Qt6
|
|
|
|
REQUIRED COMPONENTS
|
|
|
|
OpenGL
|
|
|
|
OpenGLWidgets
|
|
|
|
Quick
|
|
|
|
QuickWidgets
|
2024-02-27 15:44:31 +00:00
|
|
|
Svg
|
|
|
|
SvgWidgets
|
2022-12-20 22:07:49 +00:00
|
|
|
OPTIONAL_COMPONENTS
|
|
|
|
WebEngineQuick
|
|
|
|
WebEngineCore
|
|
|
|
WebEngineWidgets
|
2023-08-06 08:08:53 +00:00
|
|
|
TextToSpeech
|
|
|
|
Location)
|
2022-12-20 22:07:49 +00:00
|
|
|
else()
|
|
|
|
find_package(Qt5
|
|
|
|
REQUIRED COMPONENTS
|
|
|
|
OpenGL
|
|
|
|
Quick
|
|
|
|
QuickWidgets
|
|
|
|
Location
|
|
|
|
TextToSpeech
|
2024-02-27 15:44:31 +00:00
|
|
|
Svg
|
2022-12-20 22:07:49 +00:00
|
|
|
OPTIONAL_COMPONENTS
|
|
|
|
WebEngine
|
|
|
|
WebEngineCore
|
2023-04-23 18:56:41 +00:00
|
|
|
WebEngineWidgets
|
|
|
|
Gamepad)
|
2022-12-20 22:07:49 +00:00
|
|
|
endif()
|
2022-11-17 14:34:54 +00:00
|
|
|
endif()
|
2019-04-15 08:54:27 +00:00
|
|
|
endif()
|
|
|
|
|
2019-05-01 09:54:58 +00:00
|
|
|
# other requirements
|
2022-12-20 22:07:49 +00:00
|
|
|
if(NOT ANDROID)
|
|
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
endif()
|
2019-05-24 06:32:40 +00:00
|
|
|
|
2019-06-24 16:25:53 +00:00
|
|
|
if(APPLE)
|
|
|
|
find_package(ICONV)
|
|
|
|
endif()
|
|
|
|
|
2019-05-24 06:32:40 +00:00
|
|
|
# unfortunately OpenCV library from windows doesn't set the cache option
|
|
|
|
if(WIN32)
|
2022-08-06 17:11:55 +00:00
|
|
|
find_package(OpenCV OPTIONAL_COMPONENTS core highgui imgproc imgcodecs videoio) # channeltx/modatv
|
|
|
|
|
2019-05-24 06:32:40 +00:00
|
|
|
set(OpenCV_INCLUDE_DIRS "${OpenCV_INCLUDE_DIRS}" CACHE INTERNAL "")
|
|
|
|
set(OpenCV_LIBS "${OpenCV_LIBS}" CACHE INTERNAL "")
|
|
|
|
|
|
|
|
# add libs folder for fixup_bundle()
|
2019-06-24 16:25:53 +00:00
|
|
|
get_filename_component(GFN_Boost_LIBS_DIR "${Boost_LIBS}" DIRECTORY)
|
|
|
|
|
|
|
|
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
|
|
set(OpenCV_ARCH "64")
|
|
|
|
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
|
|
|
set(OpenCV_ARCH "86")
|
|
|
|
endif()
|
|
|
|
|
2020-11-01 12:03:13 +00:00
|
|
|
set(OpenCV_LIBS_BIN_DIR "${OpenCV_DIR}/x${OpenCV_ARCH}/${OpenCV_RUNTIME}/bin" CACHE INTERNAL "")
|
2019-06-24 16:25:53 +00:00
|
|
|
|
2019-05-24 06:32:40 +00:00
|
|
|
set(WINDOWS_FIXUP_BUNDLE_LIB_DIRS
|
|
|
|
"${WINDOWS_FIXUP_BUNDLE_LIB_DIRS}"
|
|
|
|
"${GFN_Boost_LIBS_DIR}"
|
2019-06-24 16:25:53 +00:00
|
|
|
"${OpenCV_LIBS_BIN_DIR}"
|
2019-05-24 06:32:40 +00:00
|
|
|
)
|
|
|
|
endif()
|
2016-10-25 22:57:46 +00:00
|
|
|
|
2023-07-30 15:48:42 +00:00
|
|
|
# When ENABLE_EXTERNAL_LIBRARIES is ON, we build most of the required 3rd party libraries from source
|
2023-07-30 12:05:00 +00:00
|
|
|
# When ENABLE_EXTERNAL_LIBRARIES is AUTO, we only build 3rd party libraries that aren't already available
|
2023-07-30 15:48:42 +00:00
|
|
|
# When ENABLE_EXTERNAL_LIBRARIES is OFF, we only use prebuilt libraries
|
|
|
|
|
2023-08-23 08:56:08 +00:00
|
|
|
if (NOT ENABLE_EXTERNAL_LIBRARIES)
|
2022-05-16 12:48:29 +00:00
|
|
|
find_package(Boost REQUIRED)
|
|
|
|
find_package(FFTW3F REQUIRED)
|
2022-12-20 22:07:49 +00:00
|
|
|
if(NOT ANDROID)
|
2023-08-23 08:56:08 +00:00
|
|
|
find_package(LibUSB REQUIRED)
|
|
|
|
endif()
|
|
|
|
elseif(ENABLE_EXTERNAL_LIBRARIES STREQUAL "AUTO")
|
|
|
|
find_package(Boost)
|
2023-08-23 10:53:22 +00:00
|
|
|
find_package(FFTW3F)
|
2023-08-23 08:56:08 +00:00
|
|
|
if(NOT ANDROID)
|
|
|
|
find_package(LibUSB)
|
2022-12-20 22:07:49 +00:00
|
|
|
endif()
|
2023-08-23 08:56:08 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT ENABLE_EXTERNAL_LIBRARIES OR (ENABLE_EXTERNAL_LIBRARIES STREQUAL "AUTO"))
|
2022-05-16 12:48:29 +00:00
|
|
|
find_package(OpenCV OPTIONAL_COMPONENTS core highgui imgproc imgcodecs videoio) # channeltx/modatv
|
|
|
|
find_package(LibSigMF) # SigMF recording files support
|
|
|
|
find_package(ZLIB) # For DAB
|
|
|
|
find_package(FAAD) # For DAB
|
2019-05-23 14:01:06 +00:00
|
|
|
find_package(Codec2)
|
2022-05-16 12:48:29 +00:00
|
|
|
find_package(CM256cc)
|
2019-05-23 14:01:06 +00:00
|
|
|
find_package(LibMbe)
|
2022-12-20 22:07:49 +00:00
|
|
|
find_package(SerialDV)
|
2019-05-23 14:01:06 +00:00
|
|
|
find_package(LibDSDcc)
|
2021-02-27 12:54:25 +00:00
|
|
|
find_package(Sgp4)
|
|
|
|
find_package(AptDec)
|
2021-04-17 20:59:40 +00:00
|
|
|
find_package(LibDAB)
|
2022-05-27 11:27:01 +00:00
|
|
|
find_package(HIDAPI)
|
2023-09-23 12:43:40 +00:00
|
|
|
find_package(FFmpeg COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE)
|
2024-05-15 09:38:25 +00:00
|
|
|
find_package(GGMorse)
|
2019-05-02 19:34:25 +00:00
|
|
|
|
2023-07-30 15:48:42 +00:00
|
|
|
# Devices
|
|
|
|
if(ENABLE_AIRSPY)
|
|
|
|
find_package(LibAIRSPY)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_AIRSPYHF)
|
|
|
|
find_package(LibAIRSPYHF)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_BLADERF)
|
|
|
|
find_package(LibBLADERF 2.0)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_HACKRF)
|
|
|
|
find_package(LibHACKRF)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_LIMESUITE)
|
|
|
|
find_package(LimeSuite)
|
|
|
|
if (LIMESUITE_FOUND)
|
|
|
|
add_definitions(-DHAS_LIMERFEUSB)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
if(ENABLE_IIO) # PlutoSDR
|
|
|
|
find_package(LibIIO)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_MIRISDR)
|
|
|
|
find_package(LibMiriSDR)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_PERSEUS)
|
|
|
|
find_package(LibPerseus)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_RTLSDR)
|
|
|
|
find_package(LibRTLSDR)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_SOAPYSDR)
|
|
|
|
find_package(SoapySDR)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_USRP)
|
|
|
|
find_package(UHD)
|
|
|
|
endif()
|
2022-05-16 12:48:29 +00:00
|
|
|
endif()
|
|
|
|
|
2023-08-23 08:56:08 +00:00
|
|
|
# The following devices can't yet be built by external/CMakeLists.txt, so always call find_package
|
|
|
|
if(ENABLE_SDRPLAY)
|
|
|
|
find_package(SDRplay)
|
|
|
|
endif()
|
|
|
|
if(ENABLE_XTRX)
|
|
|
|
find_package(LibXTRX)
|
|
|
|
endif()
|
|
|
|
|
2023-07-30 15:48:42 +00:00
|
|
|
if(ENABLE_EXTERNAL_LIBRARIES)
|
|
|
|
add_subdirectory(external)
|
|
|
|
find_package(Boost REQUIRED)
|
2017-09-05 06:27:15 +00:00
|
|
|
endif()
|
2023-07-30 15:48:42 +00:00
|
|
|
|
|
|
|
if (LIBSIGMF_FOUND AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
|
|
add_definitions(-DHAS_LIBSIGMF)
|
2020-10-02 21:45:28 +00:00
|
|
|
endif()
|
2019-05-01 09:54:58 +00:00
|
|
|
|
2022-05-29 20:26:04 +00:00
|
|
|
if(ENABLE_FUNCUBE AND LIBUSB_FOUND AND HIDAPI_FOUND)
|
2022-03-06 00:30:15 +00:00
|
|
|
add_subdirectory(fcdlib)
|
|
|
|
add_subdirectory(fcdhid)
|
|
|
|
endif()
|
2019-05-01 09:54:58 +00:00
|
|
|
|
|
|
|
# base libraries
|
|
|
|
add_subdirectory(sdrbase)
|
2017-11-11 10:11:44 +00:00
|
|
|
add_subdirectory(httpserver)
|
|
|
|
add_subdirectory(logging)
|
2018-02-22 17:43:28 +00:00
|
|
|
add_subdirectory(qrtplib)
|
2017-11-17 02:17:15 +00:00
|
|
|
add_subdirectory(swagger)
|
2019-05-01 09:54:58 +00:00
|
|
|
add_subdirectory(devices)
|
2022-07-20 14:11:31 +00:00
|
|
|
|
2022-07-31 03:26:50 +00:00
|
|
|
add_subdirectory(modemm17)
|
2023-01-12 13:15:22 +00:00
|
|
|
|
|
|
|
if (FFTW3F_FOUND)
|
|
|
|
add_subdirectory(ft8)
|
|
|
|
add_definitions(-DHAS_FT8)
|
2023-01-12 16:29:24 +00:00
|
|
|
set(FT8_SUPPORT ON CACHE INTERNAL "")
|
2024-06-16 23:16:23 +00:00
|
|
|
endif()
|
|
|
|
|
2024-07-27 04:01:39 +00:00
|
|
|
if (FFTW3F_FOUND)
|
2024-06-16 09:31:13 +00:00
|
|
|
add_subdirectory(wdsp)
|
2024-06-16 23:16:23 +00:00
|
|
|
add_definitions(-DHAS_WDSP)
|
|
|
|
set(WDSP_SUPPORT ON CACHE INTERNAL "")
|
2023-01-12 13:15:22 +00:00
|
|
|
endif()
|
2023-01-08 18:03:29 +00:00
|
|
|
|
2023-01-12 16:29:24 +00:00
|
|
|
add_subdirectory(sdrbench)
|
|
|
|
|
2019-05-01 09:54:58 +00:00
|
|
|
if (BUILD_GUI)
|
|
|
|
add_subdirectory(sdrgui)
|
2019-05-20 19:07:05 +00:00
|
|
|
add_subdirectory(plugins plugins)
|
2019-05-01 09:54:58 +00:00
|
|
|
endif()
|
2014-05-18 15:52:39 +00:00
|
|
|
|
2019-05-01 09:54:58 +00:00
|
|
|
if (BUILD_SERVER)
|
|
|
|
add_subdirectory(sdrsrv)
|
|
|
|
set(SERVER_MODE ON)
|
|
|
|
add_definitions(-DSERVER_MODE)
|
2019-05-20 19:07:05 +00:00
|
|
|
add_subdirectory(plugins pluginssrv)
|
2019-05-01 09:54:58 +00:00
|
|
|
remove_definitions(-DSERVER_MODE)
|
|
|
|
set(SERVER_MODE OFF)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# includes needed by the following target
|
2014-05-18 15:52:39 +00:00
|
|
|
include_directories(
|
2016-10-25 22:57:46 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/sdrbase
|
2019-05-01 09:54:58 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/exports
|
2017-10-22 17:12:43 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/sdrgui
|
2019-05-01 09:54:58 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/sdrsrv
|
|
|
|
${CMAKE_SOURCE_DIR}/sdrbench
|
2017-11-11 10:11:44 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/logging
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
2022-12-20 22:07:49 +00:00
|
|
|
if(NOT ANDROID)
|
|
|
|
include_directories(
|
|
|
|
${OPENGL_INCLUDE_DIR}
|
|
|
|
)
|
|
|
|
endif()
|
2014-05-18 15:52:39 +00:00
|
|
|
|
2019-08-02 21:59:27 +00:00
|
|
|
# Set up optional make target for developer doc
|
|
|
|
find_package(Doxygen)
|
|
|
|
if(DOXYGEN_FOUND)
|
|
|
|
option(WITH_DOC "Generate developer doc with Doxygen" ON)
|
|
|
|
message(STATUS "added optional 'make dev_docs' for developer documentation generation")
|
|
|
|
|
|
|
|
# It is not an error when 'dot' is not found, just switching off the Doxygen's HAVE_DOT option
|
|
|
|
find_package_handle_standard_args (Dot REQUIRED_VARS DOXYGEN_DOT_EXECUTABLE)
|
|
|
|
|
|
|
|
# This sets HAVE_CASE_SENSITIVE_FILESYSTEM which is 0 or 1, we need "YES" or "NO"
|
|
|
|
include(cmake/Modules/CheckCaseSensitiveFileSystem.cmake)
|
|
|
|
if (HAVE_CASE_SENSITIVE_FILESYSTEM)
|
|
|
|
set(CMAKE_CASE_SENSITIVE_FILESYSTEM "YES")
|
|
|
|
else()
|
|
|
|
set(CMAKE_CASE_SENSITIVE_FILESYSTEM "NO")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(WIN32 OR APPLE)
|
|
|
|
set(CMAKE_SHORT_NAMES "YES")
|
|
|
|
else()
|
|
|
|
set(CMAKE_SHORT_NAMES "NO")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(DOX_HTML_OUT ${CMAKE_CURRENT_BINARY_DIR}/dev_docs)
|
|
|
|
|
|
|
|
if (WITH_DOC)
|
|
|
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/include/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
|
|
|
|
add_custom_target(dev_docs)
|
|
|
|
add_custom_command(TARGET dev_docs POST_BUILD
|
|
|
|
COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
|
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
|
|
COMMENT "Generating developer documentation with Doxygen" VERBATIM
|
|
|
|
)
|
|
|
|
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
message(STATUS "Doxygen not found, developer documentation can not be generated")
|
|
|
|
endif()
|
|
|
|
|
2019-05-01 09:54:58 +00:00
|
|
|
############ build sdrangel benchmark ################
|
2020-11-19 16:40:01 +00:00
|
|
|
set(sdrangelbench_SOURCES
|
|
|
|
appbench/main.cpp
|
|
|
|
)
|
2018-04-23 14:43:18 +00:00
|
|
|
|
2020-11-19 16:40:01 +00:00
|
|
|
add_executable(sdrangelbench
|
|
|
|
${sdrangelbench_SOURCES}
|
|
|
|
)
|
2018-04-23 14:43:18 +00:00
|
|
|
|
2020-11-19 16:40:01 +00:00
|
|
|
target_link_libraries(sdrangelbench
|
2022-11-17 14:34:54 +00:00
|
|
|
Qt::Multimedia
|
2020-11-19 16:40:01 +00:00
|
|
|
sdrbench
|
|
|
|
logging
|
|
|
|
)
|
2023-09-12 08:20:07 +00:00
|
|
|
|
2019-05-01 09:54:58 +00:00
|
|
|
############ build sdrangel gui ################
|
2018-12-04 00:39:41 +00:00
|
|
|
if (BUILD_GUI)
|
2019-05-01 09:54:58 +00:00
|
|
|
set(sdrangel_SOURCES
|
|
|
|
app/main.cpp
|
|
|
|
sdrgui/resources/sdrangel.rc
|
2022-12-20 22:07:49 +00:00
|
|
|
settings/settings.qrc
|
2019-05-01 09:54:58 +00:00
|
|
|
)
|
2023-09-12 08:20:07 +00:00
|
|
|
if(APPLE)
|
|
|
|
set(sdrangel_SOURCES ${sdrangel_SOURCES} mac/auth.mm)
|
|
|
|
endif()
|
2022-12-20 22:07:49 +00:00
|
|
|
if(ANDROID AND NOT ENABLE_QT6)
|
|
|
|
add_library(${CMAKE_PROJECT_NAME} SHARED ${sdrangel_SOURCES})
|
|
|
|
elseif(ANDROID)
|
|
|
|
qt_add_executable(${CMAKE_PROJECT_NAME} ${sdrangel_SOURCES})
|
|
|
|
set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_SOURCE_DIR}/android/qt6)
|
|
|
|
set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY QT_ANDROID_EXTRA_PLUGINS ${CMAKE_BINARY_DIR}/lib/plugins)
|
|
|
|
set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY QT_ANDROID_EXTRA_LIBS ${ANDROID_EXTRA_LIBS})
|
|
|
|
else()
|
|
|
|
add_executable(${CMAKE_PROJECT_NAME} ${sdrangel_SOURCES})
|
|
|
|
endif()
|
2019-05-01 09:54:58 +00:00
|
|
|
|
2022-12-20 22:07:49 +00:00
|
|
|
if(ANDROID)
|
|
|
|
if(ENABLE_QT6)
|
|
|
|
target_link_libraries(${CMAKE_PROJECT_NAME} PUBLIC
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
Qt::Widgets
|
|
|
|
Qt::Multimedia
|
|
|
|
Qt::Svg
|
|
|
|
Qt::QmlModels
|
|
|
|
Qt::Quick
|
|
|
|
sdrbase
|
|
|
|
sdrgui
|
|
|
|
logging
|
|
|
|
android
|
|
|
|
log
|
|
|
|
)
|
|
|
|
else()
|
|
|
|
target_link_libraries(${CMAKE_PROJECT_NAME}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
Qt::Widgets
|
|
|
|
Qt::Multimedia
|
|
|
|
Qt::Svg
|
|
|
|
Qt::QmlModels
|
|
|
|
Qt::Quick
|
|
|
|
Qt::AndroidExtras
|
|
|
|
sdrbase
|
|
|
|
sdrgui
|
|
|
|
logging
|
|
|
|
android
|
|
|
|
log
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
target_link_libraries(${CMAKE_PROJECT_NAME}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
Qt::Widgets
|
|
|
|
Qt::Multimedia
|
2023-08-06 08:08:53 +00:00
|
|
|
Qt::Quick
|
2022-12-20 22:07:49 +00:00
|
|
|
sdrbase
|
|
|
|
sdrgui
|
|
|
|
logging
|
2023-09-12 08:20:07 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
if(APPLE)
|
|
|
|
target_link_libraries(${CMAKE_PROJECT_NAME} "-framework AVFoundation" objc)
|
2022-12-20 22:07:49 +00:00
|
|
|
endif()
|
2019-07-05 21:00:12 +00:00
|
|
|
|
2020-11-08 07:20:09 +00:00
|
|
|
if(WIN32)
|
|
|
|
set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES
|
|
|
|
WIN32_EXECUTABLE ${HIDE_CONSOLE})
|
|
|
|
endif()
|
2018-12-04 00:39:41 +00:00
|
|
|
endif()
|
2019-05-01 09:54:58 +00:00
|
|
|
|
|
|
|
############ build sdrangel server ################
|
2018-12-04 00:39:41 +00:00
|
|
|
if (BUILD_SERVER)
|
2019-05-06 12:09:28 +00:00
|
|
|
set(sdrangelsrv_SOURCES
|
|
|
|
appsrv/main.cpp
|
2019-05-01 09:54:58 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(sdrangelsrv
|
|
|
|
${sdrangelsrv_SOURCES}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(sdrangelsrv
|
2022-11-17 14:34:54 +00:00
|
|
|
Qt::Multimedia
|
2019-05-01 09:54:58 +00:00
|
|
|
sdrbase
|
|
|
|
sdrsrv
|
|
|
|
logging
|
|
|
|
)
|
2018-12-04 00:39:41 +00:00
|
|
|
endif()
|
2016-02-17 18:42:26 +00:00
|
|
|
|
2019-05-06 12:09:28 +00:00
|
|
|
############ install ##################
|
2020-11-19 16:40:01 +00:00
|
|
|
install(TARGETS sdrangelbench DESTINATION ${INSTALL_BIN_DIR})
|
2019-05-06 12:09:28 +00:00
|
|
|
if (BUILD_GUI)
|
2019-05-08 09:27:57 +00:00
|
|
|
install(TARGETS ${CMAKE_PROJECT_NAME} DESTINATION ${INSTALL_BIN_DIR})
|
2019-05-06 12:09:28 +00:00
|
|
|
endif()
|
|
|
|
if (BUILD_SERVER)
|
|
|
|
install(TARGETS sdrangelsrv DESTINATION ${INSTALL_BIN_DIR})
|
|
|
|
endif()
|
2019-05-03 15:46:01 +00:00
|
|
|
|
2019-06-01 17:28:36 +00:00
|
|
|
# install external libraries dependencies (Linux)
|
|
|
|
if (LINUX AND ENABLE_EXTERNAL_LIBRARIES)
|
2022-01-26 00:00:49 +00:00
|
|
|
install(DIRECTORY ${EXTERNAL_BUILD_LIBRARIES}/lib${LIB_SUFFIX}/ DESTINATION ${INSTALL_LIB_DIR})
|
2019-06-01 17:28:36 +00:00
|
|
|
endif()
|
2020-10-27 16:22:10 +00:00
|
|
|
if(WIN32)
|
|
|
|
include(DeployQt)
|
|
|
|
windeployqt(${CMAKE_PROJECT_NAME} ${SDRANGEL_BINARY_BIN_DIR} ${PROJECT_SOURCE_DIR}/sdrgui/resources)
|
|
|
|
endif()
|
2019-06-01 17:28:36 +00:00
|
|
|
|
2022-02-04 20:56:47 +00:00
|
|
|
# Install debug symbols
|
|
|
|
if (WIN32)
|
|
|
|
install(FILES $<TARGET_PDB_FILE:${CMAKE_PROJECT_NAME}> CONFIGURATIONS Debug RelWithDebInfo DESTINATION ${INSTALL_BIN_DIR} )
|
|
|
|
endif()
|
|
|
|
|
2019-05-06 12:09:28 +00:00
|
|
|
# install documentation
|
|
|
|
# TODO maybe install readme for every plugins
|
2019-06-24 16:25:53 +00:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/Readme.md DESTINATION ${INSTALL_DOC_DIR})
|
2019-05-22 15:16:06 +00:00
|
|
|
|
2019-06-24 16:25:53 +00:00
|
|
|
if(APPLE OR WIN32)
|
2019-05-06 12:09:28 +00:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/CHANGELOG DESTINATION ${INSTALL_DOC_DIR})
|
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${INSTALL_DOC_DIR})
|
|
|
|
endif()
|
2019-05-03 15:46:01 +00:00
|
|
|
|
2019-05-06 12:09:28 +00:00
|
|
|
#install files and directories (linux specific)
|
|
|
|
if (LINUX)
|
2019-05-07 17:36:47 +00:00
|
|
|
install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.desktop DESTINATION share/applications)
|
2019-10-11 10:32:16 +00:00
|
|
|
install(FILES ${CMAKE_SOURCE_DIR}/cmake/cpack/${CMAKE_PROJECT_NAME}_icon.svg DESTINATION share/icons/hicolor/scalable/apps)
|
2019-05-06 12:09:28 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
############ uninstall target ################
|
|
|
|
configure_file(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/include/uninstall.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
|
|
|
add_custom_target(uninstall
|
|
|
|
COMMAND ${CMAKE_COMMAND} -P
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake)
|
|
|
|
|
|
|
|
############ packaging ################
|
2019-05-08 09:27:57 +00:00
|
|
|
add_subdirectory(cmake/cpack)
|