2016-02-28 16:03:37 -05:00
|
|
|
cmake_minimum_required(VERSION 3.1.0)
|
2015-06-12 02:13:53 -04:00
|
|
|
cmake_policy(SET CMP0043 OLD)
|
2014-11-05 07:34:33 -05:00
|
|
|
|
2016-06-28 04:20:47 -04:00
|
|
|
# QT Framework
|
|
|
|
set(CMAKE_PREFIX_PATH "/Applications/Qt/5.7/clang_64/lib/cmake")
|
|
|
|
|
2016-02-24 05:51:36 -05: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 09:27:05 -05:00
|
|
|
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
|
2016-02-24 05:51:36 -05: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 09:10:22 -05:00
|
|
|
add_definitions(-DLINUX) # for compatibility with Android and Windows builds with QtCretino
|
|
|
|
|
2015-03-31 13:46:29 -04:00
|
|
|
option(V4L-RTL "Use Linux Kernel RTL-SDR Source." OFF)
|
|
|
|
option(V4L-MSI "Use Linux Kernel MSI2500 Source." OFF)
|
2015-10-21 20:19:07 -04:00
|
|
|
option(BUILD_TYPE "Build type (RELEASE, RELEASEWITHDBGINFO, DEBUG" RELEASE)
|
|
|
|
option(DEBUG_OUTPUT "Print debug messages" OFF)
|
2014-11-05 07:34:33 -05:00
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
|
|
|
|
2015-08-29 19:30:43 -04:00
|
|
|
project(sdrangel)
|
2014-05-18 11:52:39 -04:00
|
|
|
|
2015-10-21 20:19:07 -04:00
|
|
|
if (BUILD_TYPE MATCHES RELEASE)
|
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
|
|
|
elseif (BUILD_TYPE MATCHES RELEASEWITHDBGINFO)
|
|
|
|
set(CMAKE_BUILD_TYPE "ReleaseWithDebugInfo")
|
|
|
|
elseif (BUILD_TYPE MATCHES DEBUG)
|
|
|
|
set(CMAKE_BUILD_TYPE "Debug")
|
|
|
|
else()
|
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
|
|
|
endif()
|
2014-05-18 11:52:39 -04: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)
|
|
|
|
|
2015-07-20 16:51:49 -04:00
|
|
|
find_package(Boost)
|
2014-05-18 11:52:39 -04:00
|
|
|
find_package(FFTW3F)
|
2016-04-20 20:13:57 -04:00
|
|
|
find_package(LibDSDcc)
|
2016-04-06 20:00:54 -04:00
|
|
|
find_package(LibMbe)
|
2016-05-04 11:07:26 -04:00
|
|
|
find_package(SerialDV)
|
|
|
|
|
2015-07-05 11:08:06 -04:00
|
|
|
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64|x86")
|
|
|
|
SET(USE_SIMD "SSE2" CACHE STRING "Use SIMD instructions")
|
|
|
|
ENDIF()
|
|
|
|
|
2016-06-28 04:20:47 -04:00
|
|
|
# MacOS Compatibility
|
|
|
|
if(APPLE)
|
2016-06-29 04:00:38 -04:00
|
|
|
find_package(ICONV)
|
2016-06-28 04:20:47 -04:00
|
|
|
endif(APPLE)
|
2014-05-18 11:52:39 -04:00
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
#include(${QT_USE_FILE})
|
2015-10-21 20:19:07 -04:00
|
|
|
|
|
|
|
if (DEBUG_OUTPUT)
|
|
|
|
set( QT_DEFINITIONS "${QT_DEFINITIONS}" )
|
|
|
|
else()
|
|
|
|
set( QT_DEFINITIONS "${QT_DEFINITIONS} -DQT_NO_DEBUG_OUTPUT" )
|
|
|
|
endif()
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
add_definitions(${QT_DEFINITIONS})
|
|
|
|
|
|
|
|
if(MSVC)
|
|
|
|
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)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
set(sdrbase_SOURCES
|
|
|
|
sdrbase/mainwindow.cpp
|
|
|
|
|
|
|
|
sdrbase/audio/audiodeviceinfo.cpp
|
|
|
|
sdrbase/audio/audiofifo.cpp
|
|
|
|
sdrbase/audio/audiooutput.cpp
|
|
|
|
|
2015-06-19 02:27:29 -04:00
|
|
|
sdrbase/dsp/afsquelch.cpp
|
2015-09-13 05:56:14 -04:00
|
|
|
sdrbase/dsp/agc.cpp
|
2016-10-02 15:52:39 -04:00
|
|
|
sdrbase/dsp/downchannelizer.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/dsp/channelmarker.cpp
|
2015-06-15 22:42:37 -04:00
|
|
|
sdrbase/dsp/ctcssdetector.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/dsp/dspcommands.cpp
|
|
|
|
sdrbase/dsp/dspengine.cpp
|
2016-10-03 12:29:05 -04:00
|
|
|
sdrbase/dsp/dspdevicesourceengine.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/dsp/fftengine.cpp
|
2014-06-27 12:36:13 -04:00
|
|
|
sdrbase/dsp/fftfilt.cxx
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/dsp/fftwindow.cpp
|
2015-12-07 20:00:30 -05:00
|
|
|
sdrbase/dsp/filterrc.cpp
|
2016-09-10 14:03:06 -04:00
|
|
|
sdrbase/dsp/filtermbe.cpp
|
2016-10-02 04:30:58 -04:00
|
|
|
sdrbase/dsp/filerecord.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/dsp/interpolator.cpp
|
|
|
|
sdrbase/dsp/inthalfbandfilter.cpp
|
|
|
|
sdrbase/dsp/lowpass.cpp
|
|
|
|
sdrbase/dsp/movingaverage.cpp
|
|
|
|
sdrbase/dsp/nco.cpp
|
|
|
|
sdrbase/dsp/pidcontroller.cpp
|
2015-12-06 13:47:55 -05:00
|
|
|
sdrbase/dsp/phaselock.cpp
|
2016-10-06 13:18:02 -04:00
|
|
|
sdrbase/dsp/samplesinkfifo.cpp
|
2016-10-09 19:13:12 -04:00
|
|
|
sdrbase/dsp/samplesourcefifo.cpp
|
2016-10-06 09:39:18 -04:00
|
|
|
sdrbase/dsp/samplesinkfifodoublebuffered.cpp
|
2016-10-02 16:29:04 -04:00
|
|
|
sdrbase/dsp/basebandsamplesink.cpp
|
2015-05-10 13:21:46 -04:00
|
|
|
sdrbase/dsp/nullsink.cpp
|
2015-06-23 14:05:28 -04:00
|
|
|
sdrbase/dsp/spectrumscopecombovis.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/dsp/scopevis.cpp
|
|
|
|
sdrbase/dsp/spectrumvis.cpp
|
2016-10-03 09:55:16 -04:00
|
|
|
sdrbase/dsp/threadedbasebandsamplesink.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
sdrbase/gui/aboutdialog.cpp
|
|
|
|
sdrbase/gui/addpresetdialog.cpp
|
|
|
|
sdrbase/gui/basicchannelsettingswidget.cpp
|
|
|
|
sdrbase/gui/buttonswitch.cpp
|
|
|
|
sdrbase/gui/channelwindow.cpp
|
2015-07-19 12:43:48 -04:00
|
|
|
sdrbase/gui/colormapper.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/gui/glscope.cpp
|
2015-06-21 22:16:27 -04:00
|
|
|
sdrbase/gui/glscopegui.cpp
|
2016-03-02 19:09:55 -05:00
|
|
|
sdrbase/gui/glshadersimple.cpp
|
2016-03-05 00:45:05 -05:00
|
|
|
sdrbase/gui/glshadertextured.cpp
|
2016-03-01 21:09:50 -05:00
|
|
|
sdrbase/gui/glspectrum.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/gui/glspectrumgui.cpp
|
|
|
|
sdrbase/gui/indicator.cpp
|
2016-09-28 17:32:20 -04:00
|
|
|
sdrbase/gui/mypositiondialog.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/gui/pluginsdialog.cpp
|
2016-05-04 11:07:26 -04:00
|
|
|
sdrbase/gui/audiodialog.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/gui/presetitem.cpp
|
|
|
|
sdrbase/gui/rollupwidget.cpp
|
2016-05-14 08:12:57 -04:00
|
|
|
sdrbase/gui/samplingdevicecontrol.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/gui/scale.cpp
|
|
|
|
sdrbase/gui/scaleengine.cpp
|
|
|
|
sdrbase/gui/valuedial.cpp
|
|
|
|
|
2016-10-02 17:16:40 -04:00
|
|
|
sdrbase/dsp/devicesamplesource.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
sdrbase/plugin/pluginapi.cpp
|
2015-09-28 21:45:35 -04:00
|
|
|
#sdrbase/plugin/plugingui.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/plugin/plugininterface.cpp
|
|
|
|
sdrbase/plugin/pluginmanager.cpp
|
|
|
|
|
|
|
|
sdrbase/settings/preferences.cpp
|
|
|
|
sdrbase/settings/preset.cpp
|
2015-10-01 20:22:56 -04:00
|
|
|
sdrbase/settings/mainsettings.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
|
2016-01-24 17:38:55 -05:00
|
|
|
sdrbase/util/CRC64.cpp
|
2015-10-03 23:28:11 -04:00
|
|
|
sdrbase/util/db.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/util/message.cpp
|
|
|
|
sdrbase/util/messagequeue.cpp
|
2015-08-28 05:12:31 -04:00
|
|
|
sdrbase/util/prettyprint.cpp
|
2015-08-13 23:00:28 -04:00
|
|
|
sdrbase/util/syncmessenger.cpp
|
2015-08-27 20:27:05 -04:00
|
|
|
sdrbase/util/samplesourceserializer.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/util/simpleserializer.cpp
|
2015-09-01 19:51:49 -04:00
|
|
|
#sdrbase/util/spinlock.cpp
|
2016-05-15 19:12:37 -04:00
|
|
|
|
|
|
|
sdrbase/device/deviceapi.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(sdrbase_HEADERS
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/mainwindow.h
|
|
|
|
|
|
|
|
sdrbase/audio/audiodeviceinfo.h
|
|
|
|
sdrbase/audio/audiofifo.h
|
|
|
|
sdrbase/audio/audiooutput.h
|
|
|
|
|
|
|
|
sdrbase/dsp/afsquelch.h
|
2016-10-02 15:52:39 -04:00
|
|
|
sdrbase/dsp/downchannelizer.h
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/dsp/channelmarker.h
|
|
|
|
sdrbase/dsp/complex.h
|
|
|
|
sdrbase/dsp/decimators.h
|
|
|
|
sdrbase/dsp/dspcommands.h
|
|
|
|
sdrbase/dsp/dspengine.h
|
2016-10-03 12:29:05 -04:00
|
|
|
sdrbase/dsp/dspdevicesourceengine.h
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/dsp/dsptypes.h
|
|
|
|
sdrbase/dsp/fftengine.h
|
|
|
|
sdrbase/dsp/fftfilt.h
|
|
|
|
sdrbase/dsp/fftwengine.h
|
|
|
|
sdrbase/dsp/fftwindow.h
|
|
|
|
sdrbase/dsp/filterrc.h
|
2016-09-10 14:03:06 -04:00
|
|
|
sdrbase/dsp/filtermbe.h
|
2016-10-02 04:30:58 -04:00
|
|
|
sdrbase/dsp/filerecord.h
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/dsp/gfft.h
|
|
|
|
sdrbase/dsp/interpolator.h
|
|
|
|
sdrbase/dsp/inthalfbandfilter.h
|
|
|
|
sdrbase/dsp/kissfft.h
|
|
|
|
sdrbase/dsp/kissengine.h
|
|
|
|
sdrbase/dsp/lowpass.h
|
|
|
|
sdrbase/dsp/misc.h
|
|
|
|
sdrbase/dsp/movingaverage.h
|
|
|
|
sdrbase/dsp/nco.h
|
|
|
|
sdrbase/dsp/phasediscri.h
|
|
|
|
sdrbase/dsp/phaselock.h
|
2015-12-20 13:34:21 -05:00
|
|
|
sdrbase/dsp/pidcontroller.h
|
2016-10-06 13:18:02 -04:00
|
|
|
sdrbase/dsp/samplesinkfifo.h
|
2016-10-09 19:13:12 -04:00
|
|
|
sdrbase/dsp/samplesourcefifo.h
|
2016-10-06 09:39:18 -04:00
|
|
|
sdrbase/dsp/samplesinkfifodoublebuffered.h
|
|
|
|
sdrbase/dsp/samplesinkfifodecimator.h
|
2016-10-02 16:29:04 -04:00
|
|
|
sdrbase/dsp/basebandsamplesink.h
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/dsp/nullsink.h
|
|
|
|
sdrbase/dsp/scopevis.h
|
|
|
|
sdrbase/dsp/spectrumvis.h
|
2016-10-03 09:55:16 -04:00
|
|
|
sdrbase/dsp/threadedbasebandsamplesink.h
|
2016-03-07 22:54:12 -05:00
|
|
|
|
|
|
|
sdrbase/gui/aboutdialog.h
|
|
|
|
sdrbase/gui/addpresetdialog.h
|
|
|
|
sdrbase/gui/basicchannelsettingswidget.h
|
|
|
|
sdrbase/gui/buttonswitch.h
|
|
|
|
sdrbase/gui/channelwindow.h
|
|
|
|
sdrbase/gui/colormapper.h
|
|
|
|
sdrbase/gui/glscope.h
|
|
|
|
sdrbase/gui/glscopegui.h
|
|
|
|
sdrbase/gui/glshadersimple.h
|
|
|
|
sdrbase/gui/glshadertextured.h
|
|
|
|
sdrbase/gui/glspectrum.h
|
|
|
|
sdrbase/gui/glspectrumgui.h
|
|
|
|
sdrbase/gui/indicator.h
|
2016-09-28 17:32:20 -04:00
|
|
|
sdrbase/gui/mypositiondialog.h
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/gui/physicalunit.h
|
|
|
|
sdrbase/gui/pluginsdialog.h
|
2016-05-04 11:07:26 -04:00
|
|
|
sdrbase/gui/audiodialog.h
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/gui/presetitem.h
|
|
|
|
sdrbase/gui/rollupwidget.h
|
2016-05-14 08:12:57 -04:00
|
|
|
sdrbase/gui/samplingdevicecontrol.h
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/gui/scale.h
|
|
|
|
sdrbase/gui/scaleengine.h
|
|
|
|
sdrbase/gui/valuedial.h
|
|
|
|
|
2016-10-02 17:16:40 -04:00
|
|
|
sdrbase/dsp/devicesamplesource.h
|
2016-03-07 22:54:12 -05:00
|
|
|
|
|
|
|
sdrbase/plugin/pluginapi.h
|
|
|
|
sdrbase/plugin/plugingui.h
|
|
|
|
sdrbase/plugin/plugininterface.h
|
|
|
|
sdrbase/plugin/pluginmanager.h
|
|
|
|
|
|
|
|
sdrbase/settings/preferences.h
|
|
|
|
sdrbase/settings/preset.h
|
|
|
|
sdrbase/settings/mainsettings.h
|
|
|
|
|
|
|
|
sdrbase/util/CRC64.h
|
|
|
|
sdrbase/util/db.h
|
|
|
|
sdrbase/util/export.h
|
|
|
|
sdrbase/util/message.h
|
|
|
|
sdrbase/util/messagequeue.h
|
2016-06-19 18:45:24 -04:00
|
|
|
sdrbase/util/movingaverage.h
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/util/prettyprint.h
|
|
|
|
sdrbase/util/syncmessenger.h
|
|
|
|
sdrbase/util/samplesourceserializer.h
|
|
|
|
sdrbase/util/simpleserializer.h
|
|
|
|
#sdrbase/util/spinlock.h
|
2016-05-15 19:12:37 -04:00
|
|
|
|
|
|
|
sdrbase/device/deviceapi.h
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(sdrbase_SOURCES
|
|
|
|
${sdrbase_SOURCES}
|
|
|
|
${sdrbase_HEADERS}
|
|
|
|
)
|
|
|
|
|
|
|
|
set(sdrbase_FORMS
|
|
|
|
sdrbase/mainwindow.ui
|
|
|
|
|
|
|
|
sdrbase/gui/aboutdialog.ui
|
|
|
|
sdrbase/gui/addpresetdialog.ui
|
|
|
|
sdrbase/gui/basicchannelsettingswidget.ui
|
2015-06-21 22:16:27 -04:00
|
|
|
sdrbase/gui/glscopegui.ui
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase/gui/glspectrumgui.ui
|
|
|
|
sdrbase/gui/pluginsdialog.ui
|
2016-05-04 11:07:26 -04:00
|
|
|
sdrbase/gui/audiodialog.ui
|
2016-05-14 08:12:57 -04:00
|
|
|
sdrbase/gui/samplingdevicecontrol.ui
|
2016-09-28 17:32:20 -04:00
|
|
|
sdrbase/gui/myposdialog.ui
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
set(sdrbase_RESOURCES
|
|
|
|
sdrbase/resources/res.qrc
|
|
|
|
)
|
|
|
|
|
|
|
|
if(FFTW3F_FOUND)
|
|
|
|
set(sdrbase_SOURCES
|
|
|
|
${sdrbase_SOURCES}
|
|
|
|
sdrbase/dsp/fftwengine.cpp
|
|
|
|
)
|
|
|
|
set(sdrbase_HEADERS
|
|
|
|
${sdrbase_HEADERS}
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/dsp/fftwengine.h
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
add_definitions(-DUSE_FFTW)
|
|
|
|
include_directories(${FFTW3F_INCLUDE_DIRS})
|
|
|
|
else(FFTW3F_FOUND)
|
|
|
|
set(sdrbase_SOURCES
|
|
|
|
${sdrbase_SOURCES}
|
|
|
|
sdrbase/dsp/kissengine.cpp
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/dsp/kissfft.h
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
set(sdrbase_HEADERS
|
|
|
|
${sdrbase_HEADERS}
|
2016-03-07 22:54:12 -05:00
|
|
|
sdrbase/dsp/kissengine.h
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
add_definitions(-DUSE_KISSFFT)
|
|
|
|
endif(FFTW3F_FOUND)
|
|
|
|
|
2016-05-08 00:00:37 -04:00
|
|
|
if (LIBSERIALDV_FOUND)
|
|
|
|
set(sdrbase_SOURCES
|
|
|
|
${sdrbase_SOURCES}
|
|
|
|
sdrbase/dsp/dvserialworker.cpp
|
|
|
|
sdrbase/dsp/dvserialengine.cpp
|
|
|
|
)
|
|
|
|
set(sdrbase_HEADERS
|
|
|
|
${sdrbase_HEADERS}
|
|
|
|
sdrbase/dsp/dvserialworker.h
|
|
|
|
sdrbase/dsp/dvserialengine.h
|
|
|
|
)
|
|
|
|
add_definitions(-DDSD_USE_SERIALDV)
|
|
|
|
include_directories(${LIBSERIALDV_INCLUDE_DIR})
|
|
|
|
endif(LIBSERIALDV_FOUND)
|
|
|
|
|
2014-05-18 11:52:39 -04:00
|
|
|
#include(${QT_USE_FILE})
|
|
|
|
add_definitions(${QT_DEFINITIONS})
|
|
|
|
|
|
|
|
#qt5_wrap_cpp(sdrbase_HEADERS_MOC ${sdrbase_HEADERS})
|
|
|
|
qt5_wrap_ui(sdrbase_FORMS_HEADERS ${sdrbase_FORMS})
|
|
|
|
qt5_add_resources(sdrbase_RESOURCES_RCC ${sdrbase_RESOURCES})
|
|
|
|
|
|
|
|
if(WIN32)
|
2015-08-29 20:19:09 -04:00
|
|
|
SET(sdrbase_SOURCES ${sdrbase_SOURCES} sdrbase/resources/sdrangel.rc)
|
2014-05-18 11:52:39 -04:00
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
add_library(sdrbase SHARED
|
|
|
|
${sdrbase_SOURCES}
|
|
|
|
${sdrbase_HEADERS_MOC}
|
|
|
|
${sdrbase_FORMS_HEADERS}
|
|
|
|
${sdrbase_RESOURCES_RCC}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(sdrbase
|
|
|
|
${QT_LIBRARIES}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
if(FFTW3F_FOUND)
|
|
|
|
target_link_libraries(sdrbase ${FFTW3F_LIBRARIES})
|
|
|
|
endif(FFTW3F_FOUND)
|
|
|
|
|
2016-05-08 00:00:37 -04:00
|
|
|
if(LIBSERIALDV_FOUND)
|
|
|
|
target_link_libraries(sdrbase ${LIBSERIALDV_LIBRARY})
|
|
|
|
endif(LIBSERIALDV_FOUND)
|
|
|
|
|
2015-08-29 19:30:43 -04:00
|
|
|
set_target_properties(sdrbase PROPERTIES DEFINE_SYMBOL "sdrangel_EXPORTS")
|
2016-02-28 16:03:37 -05:00
|
|
|
target_compile_features(sdrbase PRIVATE cxx_generalized_initializers) # cmake >= 3.1.0
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
qt5_use_modules(sdrbase Core Widgets OpenGL Multimedia)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2016-03-07 22:54:12 -05:00
|
|
|
${CMAKE_SOURCE_DIR}/sdrbase
|
2014-05-18 11:52:39 -04:00
|
|
|
${OPENGL_INCLUDE_DIR}
|
|
|
|
)
|
|
|
|
|
2015-07-05 11:08:06 -04:00
|
|
|
if(USE_SIMD MATCHES SSE2)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
|
|
|
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -msse2" )
|
|
|
|
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -msse2" )
|
|
|
|
add_definitions(-DUSE_SIMD)
|
|
|
|
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_SIMD)
|
|
|
|
endif()
|
2014-05-18 11:52:39 -04:00
|
|
|
endif()
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
2015-08-29 19:30:43 -04:00
|
|
|
set(sdrangel_SOURCES
|
2016-03-07 22:54:12 -05:00
|
|
|
app/main.cpp
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
2015-08-29 20:19:09 -04:00
|
|
|
SET(sdrangel_SOURCES ${sdrangel_SOURCES} sdrbase/resources/sdrangel.rc)
|
2014-05-18 11:52:39 -04:00
|
|
|
endif(WIN32)
|
|
|
|
|
2015-08-29 19:30:43 -04:00
|
|
|
add_executable(sdrangel
|
|
|
|
${sdrangel_SOURCES}
|
2014-05-18 11:52:39 -04:00
|
|
|
)
|
|
|
|
|
2015-08-29 19:30:43 -04:00
|
|
|
target_link_libraries(sdrangel
|
2014-05-18 11:52:39 -04:00
|
|
|
sdrbase
|
|
|
|
${QT_LIBRARIES}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
2015-08-29 19:30:43 -04: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 11:52:39 -04:00
|
|
|
endif(WIN32)
|
|
|
|
|
2015-08-29 19:30:43 -04:00
|
|
|
qt5_use_modules(sdrangel Widgets Multimedia)
|
2014-05-18 11:52:39 -04:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
add_subdirectory(plugins)
|
2016-02-17 13:42:26 -05:00
|
|
|
|
|
|
|
if(LIBUSB_FOUND AND UNIX)
|
|
|
|
add_subdirectory(fcdhid)
|
|
|
|
add_subdirectory(fcdlib)
|
|
|
|
endif(LIBUSB_FOUND AND UNIX)
|
2016-02-24 05:51:36 -05:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
#install targets
|
|
|
|
install(TARGETS sdrangel DESTINATION bin)
|
|
|
|
install(TARGETS sdrbase DESTINATION lib)
|
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
# 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)
|