2012-10-29 20:42:52 +00:00
|
|
|
cmake_minimum_required(VERSION 2.6)
|
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
|
|
|
|
|
|
|
|
project(sdrangelove)
|
|
|
|
|
|
|
|
set(CMAKE_BUILD_TYPE "Release")
|
|
|
|
|
|
|
|
set(QT_USE_QTOPENGL TRUE)
|
|
|
|
|
|
|
|
find_package(Qt4 REQUIRED)
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
find_package(PkgConfig)
|
2013-02-14 22:18:38 +00:00
|
|
|
|
2012-10-29 20:42:52 +00:00
|
|
|
find_package(Portaudio REQUIRED)
|
2012-10-31 15:30:44 +00:00
|
|
|
find_package(LibUSB REQUIRED)
|
2013-02-14 22:18:38 +00:00
|
|
|
find_package(FFTW3F)
|
2012-10-29 20:42:52 +00:00
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
include(${QT_USE_FILE})
|
|
|
|
add_definitions(${QT_DEFINITIONS})
|
2012-10-29 20:42:52 +00:00
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
set(sdrbase_SOURCES
|
|
|
|
sdrbase/mainwindow.cpp
|
|
|
|
|
|
|
|
sdrbase/audio/audiodeviceinfo.cpp
|
|
|
|
sdrbase/audio/audiofifo.cpp
|
|
|
|
sdrbase/audio/audiooutput.cpp
|
|
|
|
sdrbase/audio/portaudioholder.cpp
|
|
|
|
|
|
|
|
sdrbase/dsp/channelizer.cpp
|
|
|
|
sdrbase/dsp/channelmarker.cpp
|
|
|
|
sdrbase/dsp/dspcommands.cpp
|
|
|
|
sdrbase/dsp/dspengine.cpp
|
|
|
|
sdrbase/dsp/fftengine.cpp
|
|
|
|
sdrbase/dsp/fftwindow.cpp
|
|
|
|
sdrbase/dsp/interpolator.cpp
|
|
|
|
sdrbase/dsp/inthalfbandfilter.cpp
|
|
|
|
sdrbase/dsp/lowpass.cpp
|
|
|
|
sdrbase/dsp/nco.cpp
|
|
|
|
sdrbase/dsp/pidcontroller.cpp
|
|
|
|
sdrbase/dsp/samplefifo.cpp
|
|
|
|
sdrbase/dsp/samplesink.cpp
|
|
|
|
sdrbase/dsp/scopevis.cpp
|
|
|
|
sdrbase/dsp/spectrumvis.cpp
|
|
|
|
sdrbase/dsp/threadedsamplesink.cpp
|
|
|
|
|
|
|
|
sdrbase/gui/addpresetdialog.cpp
|
|
|
|
sdrbase/gui/glscope.cpp
|
|
|
|
sdrbase/gui/glspectrum.cpp
|
|
|
|
sdrbase/gui/glspectrumgui.cpp
|
|
|
|
sdrbase/gui/indicator.cpp
|
|
|
|
sdrbase/gui/pluginsdialog.cpp
|
|
|
|
sdrbase/gui/preferencesdialog.cpp
|
|
|
|
sdrbase/gui/presetitem.cpp
|
|
|
|
sdrbase/gui/scale.cpp
|
|
|
|
sdrbase/gui/scaleengine.cpp
|
|
|
|
sdrbase/gui/scopewindow.cpp
|
|
|
|
sdrbase/gui/valuedial.cpp
|
|
|
|
|
|
|
|
sdrbase/dsp/samplesource/samplesource.cpp
|
|
|
|
|
|
|
|
sdrbase/plugin/pluginapi.cpp
|
|
|
|
sdrbase/plugin/plugingui.cpp
|
|
|
|
sdrbase/plugin/plugininterface.cpp
|
|
|
|
sdrbase/plugin/pluginmanager.cpp
|
|
|
|
|
|
|
|
sdrbase/settings/preferences.cpp
|
|
|
|
sdrbase/settings/preset.cpp
|
|
|
|
sdrbase/settings/settings.cpp
|
|
|
|
|
|
|
|
sdrbase/util/message.cpp
|
|
|
|
sdrbase/util/messagequeue.cpp
|
|
|
|
sdrbase/util/miniz.cpp
|
|
|
|
sdrbase/util/simpleserializer.cpp
|
|
|
|
sdrbase/util/spinlock.cpp
|
2012-10-29 20:42:52 +00:00
|
|
|
)
|
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
set(sdrbase_HEADERS
|
|
|
|
include-gpl/mainwindow.h
|
|
|
|
|
|
|
|
include-gpl/audio/audiodeviceinfo.h
|
|
|
|
include-gpl/audio/audiofifo.h
|
|
|
|
include-gpl/audio/audiooutput.h
|
|
|
|
include-gpl/audio/portaudioholder.h
|
|
|
|
|
|
|
|
include-gpl/dsp/channelizer.h
|
|
|
|
include/dsp/channelmarker.h
|
|
|
|
include-gpl/dsp/dspcommands.h
|
|
|
|
include-gpl/dsp/dspengine.h
|
|
|
|
include/dsp/dsptypes.h
|
|
|
|
include-gpl/dsp/fftengine.h
|
|
|
|
include-gpl/dsp/fftwindow.h
|
|
|
|
include-gpl/dsp/interpolator.h
|
|
|
|
include-gpl/dsp/inthalfbandfilter.h
|
|
|
|
include-gpl/dsp/lowpass.h
|
|
|
|
include-gpl/dsp/nco.h
|
|
|
|
sdrbase/dsp/pidcontroller.h
|
|
|
|
include/dsp/samplefifo.h
|
|
|
|
include/dsp/samplesink.h
|
|
|
|
include-gpl/dsp/scopevis.h
|
|
|
|
include-gpl/dsp/spectrumvis.h
|
|
|
|
include/dsp/threadedsamplesink.h
|
|
|
|
|
|
|
|
include-gpl/gui/addpresetdialog.h
|
|
|
|
include-gpl/gui/glscope.h
|
|
|
|
include-gpl/gui/glspectrum.h
|
|
|
|
include-gpl/gui/glspectrumgui.h
|
|
|
|
include-gpl/gui/indicator.h
|
|
|
|
include-gpl/gui/physicalunit.h
|
|
|
|
include-gpl/gui/pluginsdialog.h
|
|
|
|
include-gpl/gui/preferencesdialog.h
|
|
|
|
include-gpl/gui/presetitem.h
|
|
|
|
include-gpl/gui/scale.h
|
|
|
|
include-gpl/gui/scaleengine.h
|
|
|
|
include-gpl/gui/scopewindow.h
|
|
|
|
include-gpl/gui/valuedial.h
|
|
|
|
|
|
|
|
include/dsp/samplesource/samplesource.h
|
|
|
|
|
|
|
|
include/plugin/pluginapi.h
|
|
|
|
include/plugin/plugingui.h
|
|
|
|
include/plugin/plugininterface.h
|
|
|
|
include-gpl/plugin/pluginmanager.h
|
|
|
|
|
|
|
|
include-gpl/settings/preferences.h
|
|
|
|
include-gpl/settings/preset.h
|
|
|
|
include-gpl/settings/settings.h
|
|
|
|
|
|
|
|
include/util/message.h
|
|
|
|
include/util/messagequeue.h
|
|
|
|
include/util/miniz.h
|
|
|
|
include/util/simpleserializer.h
|
|
|
|
include/util/spinlock.h
|
|
|
|
)
|
2013-02-04 22:51:11 +00:00
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
set(sdrbase_SOURCES
|
|
|
|
${sdrbase_SOURCES}
|
|
|
|
${sdrbase_HEADERS}
|
|
|
|
)
|
2013-02-04 22:51:11 +00:00
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
set(sdrbase_FORMS
|
|
|
|
sdrbase/mainwindow.ui
|
2013-02-12 12:59:34 +00:00
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
sdrbase/gui/addpresetdialog.ui
|
|
|
|
sdrbase/gui/glspectrumgui.ui
|
|
|
|
sdrbase/gui/pluginsdialog.ui
|
|
|
|
sdrbase/gui/preferencesdialog.ui
|
|
|
|
sdrbase/gui/scopewindow.ui
|
2012-10-29 20:42:52 +00:00
|
|
|
)
|
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
set(sdrbase_RESOURCES
|
|
|
|
sdrbase/resources/res.qrc
|
2012-10-29 20:42:52 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
2013-03-22 10:18:30 +00:00
|
|
|
${CMAKE_SOURCE_DIR}/include
|
|
|
|
${CMAKE_SOURCE_DIR}/include-gpl
|
2012-10-29 20:42:52 +00:00
|
|
|
${OPENGL_INCLUDE_DIR}
|
|
|
|
${PORTAUDIO_INCLUDE_DIRS}
|
|
|
|
)
|
|
|
|
|
2013-02-14 22:18:38 +00:00
|
|
|
if(FFTW3F_FOUND)
|
2013-03-22 10:18:30 +00:00
|
|
|
set(sdrbase_SOURCES
|
|
|
|
${sdrbase_SOURCES}
|
|
|
|
sdrbase/dsp/fftwengine.cpp
|
2013-02-14 22:18:38 +00:00
|
|
|
)
|
2013-03-22 10:18:30 +00:00
|
|
|
set(sdrbase_HEADERS
|
|
|
|
${sdrbase_HEADERS}
|
|
|
|
include-gpl/dsp/fftwengine.h
|
2013-02-14 22:18:38 +00:00
|
|
|
)
|
|
|
|
add_definitions(-DUSE_FFTW)
|
|
|
|
include_directories(${FFTW3F_INCLUDE_DIRS})
|
|
|
|
else(FFTW3F_FOUND)
|
2013-03-22 10:18:30 +00:00
|
|
|
set(sdrbase_SOURCES
|
|
|
|
${sdrbase_SOURCES}
|
|
|
|
sdrbase/dsp/kissengine.cpp
|
|
|
|
include/dsp/kissfft.h
|
2013-02-14 22:18:38 +00:00
|
|
|
)
|
2013-03-22 10:18:30 +00:00
|
|
|
set(sdrbase_HEADERS
|
|
|
|
${sdrbase_HEADERS}
|
|
|
|
include-gpl/dsp/kissengine.h
|
2013-02-14 22:18:38 +00:00
|
|
|
)
|
|
|
|
add_definitions(-DUSE_KISSFFT)
|
|
|
|
endif(FFTW3F_FOUND)
|
|
|
|
|
2012-10-29 20:42:52 +00:00
|
|
|
include(${QT_USE_FILE})
|
|
|
|
add_definitions(${QT_DEFINITIONS})
|
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
qt4_wrap_cpp(sdrbase_HEADERS_MOC ${sdrbase_HEADERS})
|
|
|
|
qt4_wrap_ui(sdrbase_FORMS_HEADERS ${sdrbase_FORMS})
|
|
|
|
qt4_add_resources(sdrbase_RESOURCES_RCC ${sdrbase_RESOURCES})
|
2012-10-29 20:42:52 +00:00
|
|
|
|
2012-11-01 09:32:11 +00:00
|
|
|
if(WIN32)
|
2013-03-22 10:18:30 +00:00
|
|
|
SET(sdrbase_SOURCES ${sdrbase_SOURCES} resources/sdrbase.rc)
|
2012-11-01 09:32:11 +00:00
|
|
|
endif(WIN32)
|
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
add_library(sdrbase SHARED
|
|
|
|
${sdrbase_SOURCES}
|
|
|
|
${sdrbase_HEADERS_MOC}
|
|
|
|
${sdrbase_FORMS_HEADERS}
|
|
|
|
${sdrbase_RESOURCES_RCC}
|
2012-10-29 20:42:52 +00:00
|
|
|
)
|
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
target_link_libraries(sdrbase
|
2012-10-29 20:42:52 +00:00
|
|
|
${QT_LIBRARIES}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
${PORTAUDIO_LIBRARIES}
|
2012-10-31 15:30:44 +00:00
|
|
|
${LIBUSB_LIBRARIES}
|
2012-10-29 20:42:52 +00:00
|
|
|
)
|
2012-11-01 09:32:11 +00:00
|
|
|
|
2013-02-14 22:18:38 +00:00
|
|
|
if(FFTW3F_FOUND)
|
2013-03-22 10:18:30 +00:00
|
|
|
target_link_libraries(sdrbase ${FFTW3F_LIBRARIES})
|
2013-02-14 22:18:38 +00:00
|
|
|
endif(FFTW3F_FOUND)
|
|
|
|
|
2013-03-22 10:18:30 +00:00
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
set(sdrangelove_SOURCES
|
|
|
|
main.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
SET(sdrangelove_SOURCES ${sdrangelove_SOURCES} resources/sdrangelove.rc)
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
add_executable(sdrangelove
|
|
|
|
${sdrangelove_SOURCES}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(sdrangelove
|
|
|
|
sdrbase
|
|
|
|
${QT_LIBRARIES}
|
|
|
|
${OPENGL_LIBRARIES}
|
|
|
|
)
|
|
|
|
|
2012-11-01 09:32:11 +00:00
|
|
|
if(WIN32)
|
|
|
|
set_target_properties(sdrangelove PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
|
|
|
|
set_target_properties(sdrangelove PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
|
|
|
|
set_target_properties(sdrangelove PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
|
|
|
|
set_target_properties(sdrangelove PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
|
|
|
|
set_target_properties(sdrangelove PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
|
|
|
|
set_target_properties(sdrangelove PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
|
|
|
|
endif(WIN32)
|
2013-03-22 10:18:30 +00:00
|
|
|
|
|
|
|
##############################################################################
|
|
|
|
|
|
|
|
add_subdirectory(plugins)
|