2016-02-28 21:03:37 +00:00
|
|
|
cmake_minimum_required(VERSION 3.1.0)
|
2015-06-12 06:13:53 +00:00
|
|
|
cmake_policy(SET CMP0043 OLD)
|
2014-11-05 12:34:33 +00:00
|
|
|
|
2017-12-16 09:03:38 +00:00
|
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")
|
|
|
|
message(FATAL_ERROR "SDRangel requires GCC version 4.9 or higher!")
|
|
|
|
endif()
|
|
|
|
|
2016-06-28 08:20:47 +00:00
|
|
|
# QT Framework
|
|
|
|
set(CMAKE_PREFIX_PATH "/Applications/Qt/5.7/clang_64/lib/cmake")
|
|
|
|
|
2016-02-24 10:51:36 +00:00
|
|
|
# use, i.e. don't skip the full RPATH for the build tree
|
|
|
|
set(CMAKE_SKIP_BUILD_RPATH FALSE)
|
|
|
|
|
|
|
|
# when building, don't use the install RPATH already
|
|
|
|
# (but later on when installing)
|
|
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
|
|
|
|
|
2016-02-24 14:27:05 +00:00
|
|
|
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
2016-02-24 10:51:36 +00:00
|
|
|
|
|
|
|
# add the automatically determined parts of the RPATH
|
|
|
|
# which point to directories outside the build tree to the install RPATH
|
|
|
|
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
|
|
|
|
2016-03-06 14:10:22 +00:00
|
|
|
add_definitions(-DLINUX) # for compatibility with Android and Windows builds with QtCretino
|
|
|
|
|
2015-03-31 17:46:29 +00:00
|
|
|
option(V4L-RTL "Use Linux Kernel RTL-SDR Source." OFF)
|
|
|
|
option(V4L-MSI "Use Linux Kernel MSI2500 Source." OFF)
|
2015-10-22 00:19:07 +00:00
|
|
|
option(BUILD_TYPE "Build type (RELEASE, RELEASEWITHDBGINFO, DEBUG" RELEASE)
|
|
|
|
option(DEBUG_OUTPUT "Print debug messages" OFF)
|
2018-02-15 09:53:42 +00:00
|
|
|
option(SANITIZE_ADDRESS "Activate memory address sanitization" OFF)
|
2017-06-19 06:38:00 +00:00
|
|
|
option(HOST_RPI "Compiling on RPi" OFF)
|
2018-01-22 07:46:05 +00:00
|
|
|
option(RX_SAMPLE_24BIT "Internal 24 bit Rx DSP" OFF)
|
2014-11-05 12:34:33 +00:00
|
|
|
|
2014-05-18 15:52:39 +00:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
|
|
|
|
2015-08-29 23:30:43 +00:00
|
|
|
project(sdrangel)
|
2014-05-18 15:52:39 +00:00
|
|
|
|
2015-10-22 00:19:07 +00:00
|
|
|
if (BUILD_TYPE MATCHES RELEASE)
|
2016-10-25 22:57:46 +00:00
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
2015-10-22 00:19:07 +00:00
|
|
|
elseif (BUILD_TYPE MATCHES RELEASEWITHDBGINFO)
|
2016-10-25 22:57:46 +00:00
|
|
|
set(CMAKE_BUILD_TYPE "ReleaseWithDebugInfo")
|
2015-10-22 00:19:07 +00:00
|
|
|
elseif (BUILD_TYPE MATCHES DEBUG)
|
2016-10-25 22:57:46 +00:00
|
|
|
set(CMAKE_BUILD_TYPE "Debug")
|
|
|
|
elseif (BUILD_TYPE MATCHES DEBIAN)
|
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
|
|
|
set(BUILD_DEBIAN TRUE)
|
2015-10-22 00:19:07 +00:00
|
|
|
else()
|
2016-10-25 22:57:46 +00:00
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
2015-10-22 00:19:07 +00:00
|
|
|
endif()
|
2014-05-18 15:52:39 +00:00
|
|
|
|
|
|
|
set(QT_USE_QTOPENGL TRUE)
|
|
|
|
set(CMAKE_AUTOMOC ON)
|
|
|
|
|
|
|
|
#find_package(Qt4 REQUIRED)
|
|
|
|
find_package(Qt5Core 5.0 REQUIRED)
|
|
|
|
find_package(Qt5Widgets 5.0 REQUIRED)
|
|
|
|
find_package(Qt5Multimedia 5.0 REQUIRED)
|
|
|
|
#find_package(QT5OpenGL 5.0 REQUIRED)
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
find_package(PkgConfig)
|
2017-08-12 10:07:51 +00:00
|
|
|
find_package(Boost REQUIRED)
|
2014-05-18 15:52:39 +00:00
|
|
|
find_package(FFTW3F)
|
2016-10-25 22:57:46 +00:00
|
|
|
|
|
|
|
if (NOT BUILD_DEBIAN)
|
|
|
|
find_package(LibDSDcc)
|
|
|
|
find_package(LibMbe)
|
|
|
|
find_package(SerialDV)
|
|
|
|
endif()
|
2016-05-04 15:07:26 +00:00
|
|
|
|
2016-06-28 08:20:47 +00:00
|
|
|
# MacOS Compatibility
|
|
|
|
if(APPLE)
|
2016-06-29 08:00:38 +00:00
|
|
|
find_package(ICONV)
|
2016-06-28 08:20:47 +00:00
|
|
|
endif(APPLE)
|
2014-05-18 15:52:39 +00:00
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
#include(${QT_USE_FILE})
|
2015-10-22 00:19:07 +00:00
|
|
|
|
|
|
|
if (DEBUG_OUTPUT)
|
2016-10-25 22:57:46 +00:00
|
|
|
set( QT_DEFINITIONS "${QT_DEFINITIONS}" )
|
2015-10-22 00:19:07 +00:00
|
|
|
else()
|
2016-10-25 22:57:46 +00:00
|
|
|
set( QT_DEFINITIONS "${QT_DEFINITIONS} -DQT_NO_DEBUG_OUTPUT" )
|
2015-10-22 00:19:07 +00:00
|
|
|
endif()
|
|
|
|
|
2014-05-18 15:52:39 +00:00
|
|
|
add_definitions(${QT_DEFINITIONS})
|
|
|
|
|
|
|
|
if(MSVC)
|
2016-10-25 22:57:46 +00:00
|
|
|
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
|
|
|
|
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/bin_${OUTPUTCONFIG})
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/bin_${OUTPUTCONFIG})
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/bin_${OUTPUTCONFIG})
|
|
|
|
endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)
|
2014-05-18 15:52:39 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
2017-09-05 06:27:15 +00:00
|
|
|
if (HOST_RPI)
|
|
|
|
message( STATUS "Compiling on RPi" )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
EXECUTE_PROCESS( COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE )
|
|
|
|
message( STATUS "Architecture: ${ARCHITECTURE}" )
|
|
|
|
|
|
|
|
if (${ARCHITECTURE} MATCHES "x86_64|AMD64|x86")
|
|
|
|
EXECUTE_PROCESS( COMMAND grep flags /proc/cpuinfo OUTPUT_VARIABLE CPU_FLAGS )
|
|
|
|
# if (${CPU_FLAGS} MATCHES "avx2")
|
|
|
|
# set(HAS_AVX2 ON CACHE BOOL "Architecture has AVX2 SIMD enabled")
|
2018-03-04 00:47:32 +00:00
|
|
|
# if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
2017-09-05 06:27:15 +00:00
|
|
|
# set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mavx2" )
|
|
|
|
# set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -mavx2" )
|
|
|
|
# message(STATUS "Use AVX2 SIMD instructions")
|
|
|
|
# add_definitions(-DUSE_AVX2)
|
|
|
|
# else()
|
|
|
|
# set(HAS_AVX2 OFF CACHE BOOL "Architecture does not have AVX2 SIMD enabled")
|
|
|
|
# endif()
|
|
|
|
# endif()
|
|
|
|
if (${CPU_FLAGS} MATCHES "sse4_1")
|
|
|
|
set(HAS_SSE4_1 ON CACHE BOOL "Architecture has SSE 4.1 SIMD enabled")
|
2018-03-04 00:47:32 +00:00
|
|
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
2017-09-05 06:27:15 +00:00
|
|
|
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -msse4.1" )
|
|
|
|
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -msse4.1" )
|
|
|
|
message(STATUS "Use SSE 4.1 SIMD instructions")
|
|
|
|
add_definitions(-DUSE_SSE4_1)
|
|
|
|
elseif(MSVC)
|
|
|
|
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE4_1" )
|
|
|
|
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSE4_1" )
|
|
|
|
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
|
|
|
|
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
|
|
|
|
add_definitions(-DUSE_SSE4_1)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(HAS_SSE4_1 OFF CACHE BOOL "Architecture does not have SSE 4.1 SIMD enabled")
|
|
|
|
endif()
|
|
|
|
if (${CPU_FLAGS} MATCHES "ssse3")
|
|
|
|
set(HAS_SSSE3 ON CACHE BOOL "Architecture has SSSE3 SIMD enabled")
|
2018-03-04 00:47:32 +00:00
|
|
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
2017-09-05 06:27:15 +00:00
|
|
|
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mssse3" )
|
|
|
|
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -mssse3" )
|
|
|
|
message(STATUS "Use SSSE3 SIMD instructions")
|
|
|
|
add_definitions(-DUSE_SSSE3)
|
|
|
|
elseif(MSVC)
|
|
|
|
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSSE3" )
|
|
|
|
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSSE3" )
|
|
|
|
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
|
|
|
|
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
|
|
|
|
add_definitions(-DUSE_SSSE3)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(HAS_SSSE3 OFF CACHE BOOL "Architecture does not have SSSE3 SIMD enabled")
|
|
|
|
endif()
|
|
|
|
if (${CPU_FLAGS} MATCHES "sse2")
|
|
|
|
set(HAS_SSE2 ON CACHE BOOL "Architecture has SSE2 SIMD enabled")
|
2018-03-04 00:47:32 +00:00
|
|
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
2017-09-05 06:27:15 +00:00
|
|
|
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -msse2" )
|
|
|
|
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -msse2" )
|
|
|
|
message(STATUS "Use SSE2 SIMD instructions")
|
|
|
|
add_definitions(-DUSE_SSE2)
|
|
|
|
elseif(MSVC)
|
|
|
|
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE2" )
|
|
|
|
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSE2" )
|
|
|
|
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
|
|
|
|
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
|
|
|
|
add_definitions(-DUSE_SSE2)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(HAS_SSE2 OFF CACHE BOOL "Architecture does not have SSE2 SIMD enabled")
|
|
|
|
endif()
|
|
|
|
elseif (${ARCHITECTURE} MATCHES "armv7l")
|
|
|
|
EXECUTE_PROCESS( COMMAND grep Features /proc/cpuinfo OUTPUT_VARIABLE CPU_FLAGS )
|
|
|
|
if (${CPU_FLAGS} MATCHES "neon")
|
|
|
|
set(HAS_NEON ON CACHE BOOL "Architecture has NEON SIMD enabled")
|
2018-03-04 00:47:32 +00:00
|
|
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
2017-09-05 06:27:15 +00:00
|
|
|
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpu=neon" )
|
|
|
|
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -mfpu=neon" )
|
|
|
|
message(STATUS "Use NEON SIMD instructions")
|
|
|
|
add_definitions(-DUSE_NEON)
|
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
set(HAS_NEON OFF CACHE BOOL "Architecture does not have NEON SIMD enabled")
|
|
|
|
endif()
|
|
|
|
elseif (${ARCHITECTURE} MATCHES "aarch64")
|
|
|
|
set(HAS_NEON ON CACHE BOOL FORCE "Architecture has NEON SIMD enabled")
|
2018-03-04 00:47:32 +00:00
|
|
|
if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang"))
|
2017-09-05 06:27:15 +00:00
|
|
|
message(STATUS "Aarch64 always has NEON SIMD instructions")
|
|
|
|
add_definitions(-DUSE_NEON)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Compiler flags.
|
2018-01-22 07:46:05 +00:00
|
|
|
if (RX_SAMPLE_24BIT)
|
2018-02-08 15:45:00 +00:00
|
|
|
message(STATUS "Compiling for 24 bit Rx DSP chain")
|
2018-01-22 07:46:05 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSDR_RX_SAMPLE_24BIT")
|
2018-02-08 15:45:00 +00:00
|
|
|
else()
|
|
|
|
message(STATUS "Compiling for 16 bit Rx DSP chain")
|
2018-01-21 20:48:36 +00:00
|
|
|
endif()
|
2018-02-08 15:45:00 +00:00
|
|
|
|
2018-02-15 09:53:42 +00:00
|
|
|
if (SANITIZE_ADDRESS)
|
|
|
|
message(STATUS "Activate address sanitization")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
|
|
|
|
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address")
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
|
|
|
|
set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} -fsanitize=address")
|
|
|
|
endif()
|
|
|
|
|
2018-03-04 00:47:32 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wvla -Woverloaded-virtual -ffast-math -ftree-vectorize ${EXTRA_FLAGS}")
|
|
|
|
|
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fmax-errors=10")
|
|
|
|
endif()
|
2017-09-05 06:27:15 +00:00
|
|
|
|
|
|
|
##############################################################################
|
2017-10-22 17:12:43 +00:00
|
|
|
# base libraries
|
2017-10-22 10:01:04 +00:00
|
|
|
add_subdirectory(sdrbase)
|
2017-10-22 17:12:43 +00:00
|
|
|
add_subdirectory(sdrgui)
|
2017-12-17 10:09:51 +00:00
|
|
|
add_subdirectory(sdrsrv)
|
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)
|
2014-05-18 15:52:39 +00:00
|
|
|
|
|
|
|
include_directories(
|
2016-10-25 22:57:46 +00:00
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2018-03-09 12:48:14 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/exports
|
2016-10-25 22:57:46 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/sdrbase
|
2017-10-22 17:12:43 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/sdrgui
|
2017-11-11 10:11:44 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/logging
|
2016-10-25 22:57:46 +00:00
|
|
|
${OPENGL_INCLUDE_DIR}
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
|
|
|
|
2018-02-18 22:01:02 +00:00
|
|
|
##############################################################################
|
|
|
|
# External binary resources
|
|
|
|
include(${CMAKE_SOURCE_DIR}/cmake/include/Qt5ExternalResources.cmake)
|
|
|
|
|
|
|
|
qt5_add_external_resources(sdrbase.rcc sdrbase/resources/res.qrc)
|
|
|
|
|
|
|
|
|
2017-12-17 11:08:18 +00:00
|
|
|
##############################################################################
|
|
|
|
# main GUI application
|
|
|
|
|
2015-08-29 23:30:43 +00:00
|
|
|
set(sdrangel_SOURCES
|
2016-10-25 22:57:46 +00:00
|
|
|
app/main.cpp
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
2016-10-25 22:57:46 +00:00
|
|
|
SET(sdrangel_SOURCES ${sdrangel_SOURCES} sdrbase/resources/sdrangel.rc)
|
2014-05-18 15:52:39 +00:00
|
|
|
endif(WIN32)
|
|
|
|
|
2015-08-29 23:30:43 +00:00
|
|
|
add_executable(sdrangel
|
2016-10-25 22:57:46 +00:00
|
|
|
${sdrangel_SOURCES}
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
|
|
|
|
2015-08-29 23:30:43 +00:00
|
|
|
target_link_libraries(sdrangel
|
2016-10-25 22:57:46 +00:00
|
|
|
sdrbase
|
2017-10-22 17:12:43 +00:00
|
|
|
sdrgui
|
2017-11-11 10:11:44 +00:00
|
|
|
logging
|
2016-10-25 22:57:46 +00:00
|
|
|
${QT_LIBRARIES}
|
|
|
|
${OPENGL_LIBRARIES}
|
2014-05-18 15:52:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
2016-10-25 22:57:46 +00:00
|
|
|
set_target_properties(sdrangel PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
|
|
|
|
set_target_properties(sdrangel PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
|
|
|
|
set_target_properties(sdrangel PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
|
|
|
|
set_target_properties(sdrangel PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
|
|
|
|
set_target_properties(sdrangel PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
|
|
|
|
set_target_properties(sdrangel PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
|
2014-05-18 15:52:39 +00:00
|
|
|
endif(WIN32)
|
|
|
|
|
2015-08-29 23:30:43 +00:00
|
|
|
qt5_use_modules(sdrangel Widgets Multimedia)
|
2014-05-18 15:52:39 +00:00
|
|
|
|
2017-12-17 11:08:18 +00:00
|
|
|
##############################################################################
|
|
|
|
# main server application
|
|
|
|
|
|
|
|
set(sdrangelsrv_SOURCES
|
|
|
|
appsrv/main.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(sdrangelsrv
|
|
|
|
${sdrangelsrv_SOURCES}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories(sdrangelsrv
|
|
|
|
PUBLIC ${CMAKE_SOURCE_DIR}/sdrsrv
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(sdrangelsrv
|
|
|
|
sdrbase
|
|
|
|
sdrsrv
|
|
|
|
logging
|
|
|
|
${QT_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
qt5_use_modules(sdrangelsrv Multimedia)
|
|
|
|
|
2014-05-18 15:52:39 +00:00
|
|
|
##############################################################################
|
|
|
|
|
2016-10-25 22:57:46 +00:00
|
|
|
if (BUILD_DEBIAN)
|
|
|
|
add_subdirectory(cm256cc)
|
|
|
|
add_subdirectory(mbelib)
|
|
|
|
add_subdirectory(serialdv)
|
|
|
|
add_subdirectory(dsdcc)
|
|
|
|
add_subdirectory(libairspy)
|
2018-01-11 01:21:29 +00:00
|
|
|
add_subdirectory(libairspyhf)
|
2016-10-25 22:57:46 +00:00
|
|
|
add_subdirectory(libhackrf)
|
|
|
|
add_subdirectory(librtlsdr)
|
2016-11-02 14:51:45 +00:00
|
|
|
add_subdirectory(libbladerf)
|
2017-05-09 00:47:45 +00:00
|
|
|
add_subdirectory(liblimesuite)
|
2018-02-10 20:50:57 +00:00
|
|
|
add_subdirectory(libmirisdr)
|
|
|
|
add_subdirectory(libperseus)
|
2017-09-11 06:34:33 +00:00
|
|
|
add_subdirectory(libiio)
|
2016-10-25 22:57:46 +00:00
|
|
|
endif (BUILD_DEBIAN)
|
|
|
|
|
2016-12-30 15:13:28 +00:00
|
|
|
add_subdirectory(devices)
|
2014-05-18 15:52:39 +00:00
|
|
|
add_subdirectory(plugins)
|
2017-12-17 09:25:08 +00:00
|
|
|
add_subdirectory(pluginssrv)
|
2016-02-17 18:42:26 +00:00
|
|
|
|
|
|
|
if(LIBUSB_FOUND AND UNIX)
|
2016-10-25 22:57:46 +00:00
|
|
|
add_subdirectory(fcdhid)
|
|
|
|
add_subdirectory(fcdlib)
|
2016-02-17 18:42:26 +00:00
|
|
|
endif(LIBUSB_FOUND AND UNIX)
|
2016-02-24 10:51:36 +00:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
#install targets
|
|
|
|
install(TARGETS sdrangel DESTINATION bin)
|
2017-12-17 11:08:18 +00:00
|
|
|
install(TARGETS sdrangelsrv DESTINATION bin)
|
2017-10-22 10:01:04 +00:00
|
|
|
#install(TARGETS sdrbase DESTINATION lib)
|
2016-02-24 10:51:36 +00:00
|
|
|
|
2017-11-29 18:26:09 +00:00
|
|
|
#install files and directories
|
|
|
|
install(DIRECTORY udev-rules DESTINATION share/sdrangel)
|
|
|
|
install(FILES udev-rules/install.sh DESTINATION share/sdrangel/udev-rules PERMISSIONS WORLD_EXECUTE)
|
2018-02-18 22:01:02 +00:00
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/sdrbase.rcc DESTINATION bin)
|
2017-11-29 18:26:09 +00:00
|
|
|
|
2016-02-24 10:51:36 +00:00
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
# uninstall target
|
|
|
|
configure_file(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
|
|
|
add_custom_target(uninstall
|
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
|