1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-23 00:18:37 -05:00
sdrangel/sdrbase/CMakeLists.txt

720 lines
20 KiB
CMake
Raw Normal View History

project (sdrbase)
2019-05-02 10:56:07 -04:00
if(WIN32)
# This should probably be in ../CMakeLists.txt with the other variables like it
set(OPUS_INCLUDE_DIRS "${CMAKE_SOURCE_DIR}/external/windows/libopus/include")
set(OPUS_LIBRARIES "${CMAKE_SOURCE_DIR}/external/windows/libopus/lib/x64/libopus.lib")
2019-05-02 10:56:07 -04:00
endif()
find_package(Opus REQUIRED)
if(FFTW3F_FOUND)
set(sdrbase_SOURCES
${sdrbase_SOURCES}
dsp/fftwengine.cpp
)
set(sdrbase_HEADERS
${sdrbase_HEADERS}
dsp/fftwengine.h
)
add_definitions(-DUSE_FFTW)
include_directories(${FFTW3F_INCLUDE_DIRS})
set(sdrbase_FFTW3F_LIB ${FFTW3F_LIBRARIES})
2023-08-13 18:52:57 -04:00
endif(FFTW3F_FOUND)
# Kiss FFT is always available
set(sdrbase_SOURCES
${sdrbase_SOURCES}
dsp/kissengine.cpp
dsp/kissfft.h
)
set(sdrbase_HEADERS
${sdrbase_HEADERS}
dsp/kissengine.h
)
add_definitions(-DUSE_KISSFFT)
# Vulkan SDK: https://vulkan.lunarg.com/
# Windows Vulkan SDK is missing glslang_c_interface.h
# See bug: https://vulkan.lunarg.com/issue/view/63d158a85df11200d569b2ab
# Copy it from Linux SDK
2023-08-14 05:37:27 -04:00
if (${VKFFT_BACKEND} EQUAL 0)
find_package(Vulkan)
if(Vulkan_FOUND)
set(sdrbase_SOURCES
${sdrbase_SOURCES}
dsp/vulkanvkfftengine.cpp
dsp/vulkanvkfftengine.h
)
endif()
2023-08-13 18:52:57 -04:00
endif()
# CUDA Toolkit: https://developer.nvidia.com/cuda-downloads
2023-08-14 05:37:27 -04:00
if (${VKFFT_BACKEND} EQUAL 1)
find_package(CUDA 9.0)
if(CUDA_FOUND)
enable_language(CUDA)
set(sdrbase_SOURCES
${sdrbase_SOURCES}
dsp/cudavkfftengine.cpp
dsp/cudavkfftengine.h
)
endif()
2023-08-14 07:55:14 -04:00
if(WIN32)
set(WINDOWS_FIXUP_BUNDLE_LIB_DIRS ${WINDOWS_FIXUP_BUNDLE_LIB_DIRS} ${CUDA_TOOLKIT_ROOT_DIR}/bin PARENT_SCOPE)
endif()
2023-08-13 18:52:57 -04:00
endif()
2023-08-14 05:37:27 -04:00
if((Vulkan_FOUND AND (${VKFFT_BACKEND} EQUAL 0)) OR (CUDA_FOUND AND (${VKFFT_BACKEND} EQUAL 1)))
2023-08-13 18:52:57 -04:00
set(sdrbase_SOURCES
${sdrbase_SOURCES}
dsp/vkfftengine.cpp
dsp/vkfftengine.h
dsp/vkfftutils.cpp
dsp/vkfftutils.h
)
include_directories(${VKFFT_INCLUDE_DIR})
endif()
2023-05-26 03:28:12 -04:00
if (LIBSIGMF_FOUND)
2020-11-09 20:09:21 -05:00
set(sdrbase_SOURCES
${sdrbase_SOURCES}
dsp/sigmffilerecord.cpp
)
set(sdrbase_HEADERS
${sdrbase_HEADERS}
dsp/sigmf_forward.h
2020-11-09 20:09:21 -05:00
dsp/sigmffilerecord.h
)
include_directories(${LIBSIGMF_INCLUDE_DIR})
endif()
2020-11-09 20:09:21 -05:00
if (LIBSERIALDV_FOUND)
add_definitions(-DDSD_USE_SERIALDV)
include_directories(${LIBSERIALDV_INCLUDE_DIR})
set(sdrbase_SERIALDV_LIB ${LIBSERIALDV_LIBRARY})
endif()
set(sdrbase_SOURCES
${sdrbase_SOURCES}
audio/audiocompressor.cpp
audio/audiocompressorsnd.cpp
audio/audiodeviceinfo.cpp
audio/audiodevicemanager.cpp
audio/audiofifo.cpp
audio/audiofilter.cpp
2019-02-16 05:06:34 -05:00
audio/audiog722.cpp
2019-02-17 20:07:30 -05:00
audio/audioopus.cpp
audio/audiooutputdevice.cpp
audio/audioinputdevice.cpp
audio/audionetsink.cpp
audio/audioresampler.cpp
2019-05-09 11:27:12 -04:00
channel/channelapi.cpp
channel/channelutils.cpp
channel/channelwebapiutils.cpp
channel/remotedataqueue.cpp
channel/remotedatareadqueue.cpp
2018-01-04 05:11:53 -05:00
commands/command.cpp
commands/commandkeyreceiver.cpp
dsp/afsquelch.cpp
dsp/agc.cpp
dsp/downchannelizer.cpp
dsp/upchannelizer.cpp
dsp/channelmarker.cpp
dsp/ctcssdetector.cpp
dsp/ctcssfrequencies.cpp
2019-11-23 01:39:57 -05:00
dsp/channelsamplesink.cpp
dsp/channelsamplesource.cpp
dsp/costasloop.cpp
dsp/cwkeyer.cpp
dsp/cwkeyersettings.cpp
dsp/datafifo.cpp
2021-04-17 12:14:15 -04:00
dsp/dcscodes.cpp
dsp/decimatorsff.cpp
dsp/decimatorsfi.cpp
dsp/decimatorc.cpp
dsp/dspcommands.cpp
dsp/dspengine.cpp
dsp/dspdevicesourceengine.cpp
dsp/dspdevicesinkengine.cpp
2019-05-15 18:43:15 -04:00
dsp/dspdevicemimoengine.cpp
2018-05-20 04:42:14 -04:00
dsp/fftcorr.cpp
dsp/fftengine.cpp
2020-03-12 01:27:38 -04:00
dsp/fftfactory.cpp
2018-05-21 18:13:40 -04:00
dsp/fftfilt.cpp
2023-11-05 04:33:27 -05:00
dsp/fftnr.cpp
dsp/fftwindow.cpp
dsp/filterrc.cpp
dsp/filtermbe.cpp
dsp/filerecord.cpp
2020-08-06 04:46:49 -04:00
dsp/filerecordinterface.cpp
2020-10-31 16:30:45 -04:00
dsp/firfilter.cpp
dsp/fmpreemphasis.cpp
2018-05-16 19:05:48 -04:00
dsp/freqlockcomplex.cpp
dsp/interpolator.cpp
dsp/glscopesettings.cpp
dsp/spectrumsettings.cpp
2020-11-24 07:31:16 -05:00
dsp/goertzel.cpp
dsp/hbfilterchainconverter.cpp
dsp/hbfiltertraits.cpp
dsp/mimochannel.cpp
2023-03-21 06:54:42 -04:00
dsp/morsedemod.cpp
dsp/nco.cpp
dsp/ncof.cpp
dsp/phaselock.cpp
dsp/phaselockcomplex.cpp
dsp/projector.cpp
2019-09-24 18:35:02 -04:00
dsp/samplemififo.cpp
dsp/samplemofifo.cpp
dsp/samplesinkfifo.cpp
2020-07-16 10:57:51 -04:00
dsp/samplesimplefifo.cpp
dsp/samplesourcefifo.cpp
dsp/scopevis.cpp
dsp/basebandsamplesink.cpp
dsp/basebandsamplesource.cpp
dsp/recursivefilters.cpp
dsp/wfir.cpp
dsp/devicesamplesource.cpp
dsp/devicesamplesink.cpp
2019-05-15 18:43:15 -04:00
dsp/devicesamplemimo.cpp
dsp/devicesamplestatic.cpp
2021-08-07 13:45:48 -04:00
dsp/spectrummarkers.cpp
dsp/spectrumcalibrationpoint.cpp
dsp/spectrumvis.cpp
dsp/wavfilerecord.cpp
2019-05-07 18:30:40 -04:00
device/deviceapi.cpp
2017-11-01 22:30:54 -04:00
device/deviceenumerator.cpp
2020-10-01 00:09:37 -04:00
device/deviceset.cpp
2019-06-12 12:50:53 -04:00
device/deviceuserargs.cpp
device/deviceutils.cpp
feature/feature.cpp
feature/featureset.cpp
2020-09-23 23:38:05 -04:00
feature/featureutils.cpp
2021-01-13 14:58:07 -05:00
feature/featurewebapiutils.cpp
pipes/datafifostore.cpp
pipes/datapipes.cpp
pipes/datapipesgcworker.cpp
pipes/messagepipes.cpp
pipes/messagepipesgcworker.cpp
2022-02-24 02:32:07 -05:00
pipes/messagequeuestore.cpp
2022-02-20 16:08:49 -05:00
pipes/objectpipe.cpp
pipes/objectpipesregistrations.cpp
settings/configuration.cpp
2020-09-23 23:38:05 -04:00
settings/featuresetpreset.cpp
2023-08-24 10:51:50 -04:00
settings/pluginpreset.cpp
settings/preferences.cpp
settings/preset.cpp
settings/mainsettings.cpp
settings/rollupstate.cpp
util/airlines.cpp
2021-05-07 16:50:27 -04:00
util/ais.cpp
util/android.cpp
2023-05-15 11:40:43 -04:00
util/aprsfi.cpp
util/aviationweather.cpp
2021-01-13 14:58:07 -05:00
util/ax25.cpp
2021-01-13 15:51:38 -05:00
util/aprs.cpp
util/astronomy.cpp
util/azel.cpp
util/baudot.cpp
util/callsign.cpp
2022-06-18 07:35:44 -04:00
util/colormap.cpp
util/coordinates.cpp
util/countrydat.cpp
util/crc.cpp
util/CRC64.cpp
2020-11-29 19:30:18 -05:00
util/csv.cpp
util/db.cpp
2023-05-15 11:40:43 -04:00
util/dsc.cpp
2018-02-03 01:18:26 -05:00
util/fixedtraits.cpp
util/fits.cpp
util/flightinformation.cpp
2023-01-19 17:51:43 -05:00
util/ft8message.cpp
util/giro.cpp
2021-04-17 12:14:15 -04:00
util/golay2312.cpp
util/httpdownloadmanager.cpp
util/interpolation.cpp
2024-02-27 10:41:14 -05:00
util/kiwisdrlist.cpp
util/lfsr.cpp
2021-01-13 14:58:07 -05:00
util/maidenhead.cpp
util/message.cpp
util/messagequeue.cpp
2023-05-15 11:40:43 -04:00
util/mmsi.cpp
2020-11-24 07:31:16 -05:00
util/morse.cpp
2024-02-27 10:41:14 -05:00
util/nasaglobalimagery.cpp
util/navtex.cpp
util/openaip.cpp
util/osndb.cpp
util/ourairportsdb.cpp
2022-10-02 18:23:47 -04:00
util/peakfinder.cpp
util/planespotters.cpp
util/png.cpp
util/prettyprint.cpp
2023-08-13 18:52:57 -04:00
util/profiler.cpp
2023-09-06 10:21:22 -04:00
util/psk31.cpp
util/radiosonde.cpp
2024-02-27 10:41:14 -05:00
util/rainviewer.cpp
util/rtpsink.cpp
util/syncmessenger.cpp
util/samplesourceserializer.cpp
util/simpleserializer.cpp
2020-01-11 19:10:51 -05:00
util/serialutil.cpp
#util/spinlock.cpp
2024-02-27 10:41:14 -05:00
util/spyserverlist.cpp
2023-09-04 08:01:22 -04:00
util/rtty.cpp
util/uid.cpp
2020-11-24 07:31:16 -05:00
util/units.cpp
util/timeutil.cpp
2021-06-09 11:17:59 -04:00
util/visa.cpp
2024-02-27 10:41:14 -05:00
util/waypoints.cpp
util/weather.cpp
util/iot/device.cpp
util/iot/homeassistant.cpp
util/iot/tplink.cpp
util/iot/visa.cpp
plugin/plugininterface.cpp
2017-11-01 18:00:00 -04:00
plugin/pluginapi.cpp
plugin/pluginmanager.cpp
2020-10-11 06:39:30 -04:00
webapi/webapiadapter.cpp
webapi/webapiadapterbase.cpp
webapi/webapiadapterinterface.cpp
2017-11-16 21:55:36 -05:00
webapi/webapirequestmapper.cpp
webapi/webapiserver.cpp
2020-09-27 18:18:30 -04:00
webapi/webapiutils.cpp
websockets/wsspectrum.cpp
availablechannelorfeature.cpp
availablechannelorfeaturehandler.cpp
mainparser.cpp
maincore.cpp
remotetcpsinkstarter.cpp
resources/data.qrc
2019-05-31 04:14:10 -04:00
resources/webapi.qrc
)
set(sdrbase_HEADERS
${sdrbase_HEADERS}
audio/audiocompressor.h
audio/audiocompressorsnd.h
audio/audiodeviceinfo.h
audio/audiodevicemanager.h
audio/audiofifo.h
audio/audiofilter.h
2019-02-16 05:06:34 -05:00
audio/audiog722.h
audio/audiooutputdevice.h
2019-02-17 20:07:30 -05:00
audio/audioopus.h
audio/audioinputdevice.h
audio/audionetsink.h
audio/audioresampler.h
2019-05-09 11:27:12 -04:00
channel/channelapi.h
channel/channelutils.h
channel/channelwebapiutils.h
channel/remotedataqueue.h
channel/remotedatareadqueue.h
channel/remotedatablock.h
2018-01-04 05:11:53 -05:00
commands/command.h
commands/commandkeyreceiver.h
dsp/afsquelch.h
dsp/autocorrector.h
dsp/downchannelizer.h
dsp/upchannelizer.h
dsp/channelmarker.h
2019-11-23 01:39:57 -05:00
dsp/channelsamplesink.h
dsp/channelsamplesource.h
dsp/complex.h
dsp/costasloop.h
dsp/ctcssdetector.h
dsp/ctcssfrequencies.h
dsp/cwkeyer.h
dsp/cwkeyersettings.h
dsp/datafifo.h
2021-04-17 12:14:15 -04:00
dsp/dcscodes.h
dsp/decimators.h
dsp/decimatorsif.h
dsp/decimatorsff.h
dsp/decimatorsfi.h
dsp/decimatorsu.h
dsp/decimatorc.h
dsp/interpolators.h
dsp/interpolatorsif.h
dsp/dspcommands.h
dsp/dspengine.h
dsp/dspdevicesourceengine.h
dsp/dspdevicesinkengine.h
2019-05-15 18:43:15 -04:00
dsp/dspdevicemimoengine.h
dsp/dsptypes.h
2018-05-20 04:42:14 -04:00
dsp/fftcorr.h
dsp/fftengine.h
2020-03-12 01:27:38 -04:00
dsp/fftfactory.h
dsp/fftfilt.h
2023-11-05 04:33:27 -05:00
dsp/fftnr.h
dsp/fftwengine.h
dsp/fftwindow.h
dsp/filterrc.h
dsp/filtermbe.h
dsp/filerecord.h
2020-08-06 04:46:49 -04:00
dsp/filerecordinterface.h
2020-10-31 16:30:45 -04:00
dsp/firfilter.h
dsp/fmpreemphasis.h
2018-05-16 19:05:48 -04:00
dsp/freqlockcomplex.h
dsp/gfft.h
dsp/glscopesettings.h
2020-11-11 04:23:31 -05:00
dsp/glspectruminterface.h
2021-08-07 13:45:48 -04:00
dsp/spectrummarkers.h
dsp/spectrumcalibrationpoint.h
dsp/spectrumsettings.h
2020-11-24 07:31:16 -05:00
dsp/goertzel.h
dsp/hbfilterchainconverter.h
dsp/iirfilter.h
dsp/interpolator.h
dsp/hbfiltertraits.h
dsp/inthalfbandfilter.h
dsp/inthalfbandfilterdb.h
dsp/inthalfbandfilterdbf.h
dsp/inthalfbandfiltereo.h
# dsp/inthalfbandfiltereo1.h
# dsp/inthalfbandfiltereo1i.h
# dsp/inthalfbandfiltereo2.h
dsp/inthalfbandfiltereof.h
dsp/inthalfbandfilterst.h
dsp/inthalfbandfiltersti.h
dsp/kissfft.h
dsp/kissengine.h
2020-10-31 19:45:19 -04:00
dsp/firfilter.h
2021-05-07 16:50:27 -04:00
dsp/gaussian.h
dsp/mimochannel.h
dsp/misc.h
dsp/movingaverage.h
2023-03-21 06:54:42 -04:00
dsp/morsedemod.h
dsp/nco.h
dsp/ncof.h
dsp/phasediscri.h
dsp/phaselock.h
dsp/phaselockcomplex.h
dsp/projector.h
dsp/raisedcosine.h
dsp/recursivefilters.h
2023-11-22 09:28:35 -05:00
dsp/replaybuffer.h
2021-03-18 13:17:58 -04:00
dsp/rootraisedcosine.h
2019-09-24 18:35:02 -04:00
dsp/samplemififo.h
dsp/samplemofifo.h
dsp/samplesinkfifo.h
2020-07-16 10:57:51 -04:00
dsp/samplesimplefifo.h
dsp/samplesourcefifo.h
dsp/scopevis.h
dsp/basebandsamplesink.h
dsp/basebandsamplesource.h
dsp/wfir.h
dsp/devicesamplesource.h
dsp/devicesamplesink.h
2019-05-15 18:43:15 -04:00
dsp/devicesamplemimo.h
dsp/devicesamplestatic.h
dsp/spectrumvis.h
dsp/wavfilerecord.h
2019-05-07 18:30:40 -04:00
device/deviceapi.h
2017-11-01 22:30:54 -04:00
device/deviceenumerator.h
2020-10-01 00:09:37 -04:00
device/deviceset.h
2019-06-12 12:50:53 -04:00
device/deviceuserargs.h
device/deviceutils.h
feature/feature.h
feature/featureset.h
2020-09-23 23:38:05 -04:00
feature/featureutils.h
2021-01-13 14:58:07 -05:00
feature/featurewebapiutils.h
pipes/datafifostore.h
pipes/datapipes.h
pipes/datapipesgcworker.h
pipes/elementpipescommon.h
pipes/elementpipesgc.h
pipes/messagepipes.h
pipes/messagepipesgcworker.h
2022-02-24 02:32:07 -05:00
pipes/messagequeuestore.h
2022-02-20 16:08:49 -05:00
pipes/objectpipe.h
pipes/objectpipesregistrations.h
plugin/plugininterface.h
2017-11-01 18:00:00 -04:00
plugin/pluginapi.h
plugin/pluginmanager.h
settings/configuration.h
2020-09-23 23:38:05 -04:00
settings/featuresetpreset.h
2023-08-24 10:51:50 -04:00
settings/pluginpreset.h
settings/preferences.h
settings/preset.h
settings/mainsettings.h
settings/rollupstate.h
util/airlines.h
2021-05-07 16:50:27 -04:00
util/ais.h
util/android.h
2023-05-15 11:40:43 -04:00
util/aprsfi.h
util/aviationweather.h
2021-01-13 14:58:07 -05:00
util/ax25.h
2021-01-13 15:51:38 -05:00
util/aprs.h
util/astronomy.h
util/azel.h
util/baudot.h
util/callsign.h
2022-06-18 07:35:44 -04:00
util/colormap.h
util/coordinates.h
util/countrydat.h
util/CRC64.h
2020-11-29 19:30:18 -05:00
util/csv.h
util/db.h
2023-05-15 11:40:43 -04:00
util/dsc.h
util/doublebuffer.h
2018-04-21 03:23:01 -04:00
util/doublebufferfifo.h
2021-06-01 04:58:29 -04:00
util/doublebuffermultiple.h
2018-02-03 01:18:26 -05:00
util/fixedtraits.h
util/fits.h
util/flightinformation.h
2023-01-19 17:51:43 -05:00
util/ft8message.h
util/giro.h
2021-04-17 12:14:15 -04:00
util/golay2312.h
util/httpdownloadmanager.h
2019-10-18 23:07:24 -04:00
util/incrementalarray.h
util/incrementalvector.h
util/interpolation.h
2024-02-27 10:41:14 -05:00
util/kiwisdrlist.h
util/lfsr.h
2021-01-13 14:58:07 -05:00
util/maidenhead.h
util/message.h
util/messagequeue.h
2023-05-15 11:40:43 -04:00
util/mmsi.h
2020-11-24 07:31:16 -05:00
util/morse.h
util/movingaverage.h
util/movingmaximum.h
2024-02-27 10:41:14 -05:00
util/nasaglobalimagery.h
util/navtex.h
util/openaip.h
util/osndb.h
util/outairportsdb.h
2022-10-02 18:23:47 -04:00
util/peakfinder.h
util/planespotters.h
util/png.h
util/prettyprint.h
2023-08-13 18:52:57 -04:00
util/profiler.h
2023-09-06 10:21:22 -04:00
util/psk31.h
util/radiosonde.h
2024-02-27 10:41:14 -05:00
util/rainviewer.h
util/rtpsink.h
2023-09-04 08:01:22 -04:00
util/rtty.h
util/syncmessenger.h
util/samplesourceserializer.h
util/simpleserializer.h
2020-01-11 19:10:51 -05:00
util/serialutil.h
#util/spinlock.h
2024-02-27 10:41:14 -05:00
util/spyserverlist.h
util/uid.h
2020-11-24 07:31:16 -05:00
util/units.h
util/timeutil.h
2021-06-09 11:17:59 -04:00
util/visa.h
2024-02-27 10:41:14 -05:00
util/waypoints.h
util/weather.h
util/iot/device.h
util/iot/homeassistant.h
util/iot/tplink.h
util/iot/visa.h
2020-10-11 06:39:30 -04:00
webapi/webapiadapter.h
webapi/webapiadapterbase.h
webapi/webapiadapterinterface.h
webapi/webapirequestmapper.h
webapi/webapiserver.h
2020-09-27 18:18:30 -04:00
webapi/webapiutils.h
websockets/wsspectrum.h
availablechannelorfeature.h
availablechannelorfeaturehandler.h
mainparser.h
maincore.h
remotetcpsinkstarter.h
)
include_directories(
${CMAKE_SOURCE_DIR}/exports
${CMAKE_SOURCE_DIR}/httpserver
${CMAKE_SOURCE_DIR}/logging
${CMAKE_SOURCE_DIR}/qrtplib
${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client
2018-12-01 21:06:04 -05:00
${Boost_INCLUDE_DIRS}
2019-02-17 20:07:30 -05:00
${OPUS_INCLUDE_DIRS}
${Qt${QT_DEFAULT_MAJOR_VERSION}Gui_PRIVATE_INCLUDE_DIRS}
)
add_library(sdrbase SHARED
${sdrbase_SOURCES}
)
2020-04-30 08:19:19 -04:00
if(LIMESUITE_EXTERNAL)
add_dependencies(sdrbase limesuite)
endif()
if(LIBSERIALDV_EXTERNAL)
add_dependencies(sdrbase serialdv)
endif()
if(DEFINED FFTW3F_DEPENDS)
add_dependencies(sdrbase "${FFTW3F_DEPENDS}")
endif()
if(DEFINED OPUS_DEPENDS)
add_dependencies(sdrbase "${OPUS_DEPENDS}")
endif()
2023-07-30 16:50:25 -04:00
if(DEFINED LIBSIGMF_DEPENDS)
add_dependencies(sdrbase "${LIBSIGMF_DEPENDS}")
endif()
2023-08-13 18:52:57 -04:00
if(Vulkan_FOUND AND (${VKFFT_BACKEND} EQUAL 0))
target_compile_definitions(sdrbase PUBLIC -DVK_API_VERSION=11)
target_include_directories(sdrbase PUBLIC ${Vulkan_INCLUDE_DIR} ${Vulkan_INCLUDE_DIR}/glslang/Include)
add_compile_definitions(sdrbase VKFFT_BACKEND=0)
find_library(VULKAN_SPIRV_LIB SPIRV HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_SPVREMAPPER_LIB SPVRemapper HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_SPIRV_TOOLS_LIB SPIRV-Tools HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
2023-08-14 05:37:27 -04:00
find_library(VULKAN_SPIRV_TOOLS_OPT_LIB SPIRV-Tools-opt HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_SPIRV_TOOLS_SHARED_LIB SPIRV-Tools-shared HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
2023-08-13 18:52:57 -04:00
find_library(VULKAN_HLSL_LIB HLSL HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_OGLCOMPILER_LIB OGLCompiler HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_OSDEPENDENT_LIB OSDependent HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_GLSLANG_LIB glslang HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_GLSLANG_RES_LIB glslang-default-resource-limits HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_MACHINEINDEPENDENT_LIB MachineIndependent HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_GENERICCODEGEN_LIB GenericCodeGen HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
2023-08-14 05:37:27 -04:00
if(MSVC)
set(VULKAN_DEBUG_POSTFIX "d")
else()
set(VULKAN_DEBUG_POSTFIX "")
endif()
find_library(VULKAN_SPIRVD_LIB SPIRV${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_SPVREMAPPERD_LIB SPVRemapper${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_SPIRV_TOOLSD_LIB SPIRV-Tools${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_SPIRV_TOOLS_OPTD_LIB SPIRV-Tools-opt${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_SPIRV_TOOLS_SHAREDD_LIB SPIRV-Tools-shared${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_HLSLD_LIB HLSL${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_OGLCOMPILERD_LIB OGLCompiler${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_OSDEPENDENTD_LIB OSDependent${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_GLSLANGD_LIB glslang${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_GLSLANG_RESD_LIB glslang-default-resource-limits${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_MACHINEINDEPENDENTD_LIB MachineIndependent${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
find_library(VULKAN_GENERICCODEGEND_LIB GenericCodeGen${VULKAN_DEBUG_POSTFIX} HINTS "$ENV{VULKAN_SDK}/lib" REQUIRED)
2023-08-13 18:52:57 -04:00
target_link_libraries(sdrbase
optimized ${VULKAN_SPIRV_LIB}
optimized ${VULKAN_SPVREMAPPER_LIB}
optimized ${VULKAN_SPIRV_TOOLS_LIB}
optimized ${VULKAN_SPIRV_TOOLS_OPT_LIB}
optimized ${VULKAN_SPIRV_TOOLS_SHARED_LIB}
optimized ${VULKAN_HLSL_LIB}
optimized ${VULKAN_OGLCOMPILER_LIB}
optimized ${VULKAN_OSDEPENDENT_LIB}
optimized ${VULKAN_GLSLANG_LIB}
optimized ${VULKAN_GLSLANG_RES_LIB}
optimized ${VULKAN_MACHINEINDEPENDENT_LIB}
optimized ${VULKAN_GENERICCODEGEN_LIB}
optimized Vulkan::Vulkan
debug ${VULKAN_SPIRVD_LIB}
debug ${VULKAN_SPVREMAPPERD_LIB}
debug ${VULKAN_SPIRV_TOOLSD_LIB}
debug ${VULKAN_SPIRV_TOOLS_OPTD_LIB}
debug ${VULKAN_SPIRV_TOOLS_SHAREDD_LIB}
debug ${VULKAN_HLSLD_LIB}
debug ${VULKAN_OGLCOMPILERD_LIB}
debug ${VULKAN_OSDEPENDENTD_LIB}
debug ${VULKAN_GLSLANGD_LIB}
debug ${VULKAN_GLSLANG_RESD_LIB}
debug ${VULKAN_MACHINEINDEPENDENTD_LIB}
debug ${VULKAN_GENERICCODEGEND_LIB}
2023-08-14 05:37:27 -04:00
debug Vulkan::Vulkan
2023-08-13 18:52:57 -04:00
)
endif()
if(CUDA_FOUND AND (${VKFFT_BACKEND} EQUAL 1))
set_property(TARGET sdrbase PROPERTY CUDA_ARCHITECTURES 60 70 75 80 86)
add_compile_definitions(sdrbase VKFFT_BACKEND=1)
target_compile_options(sdrbase PUBLIC
"$<$<COMPILE_LANGUAGE:CUDA>:SHELL:
-DVKFFT_BACKEND=1
-gencode arch=compute_60,code=compute_60
-gencode arch=compute_70,code=compute_70
-gencode arch=compute_75,code=compute_75
-gencode arch=compute_80,code=compute_80
-gencode arch=compute_86,code=compute_86>")
set_target_properties(sdrbase PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
set_target_properties(sdrbase PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON)
find_library(CUDA_NVRTC_LIB libnvrtc nvrtc HINTS "${CUDA_TOOLKIT_ROOT_DIR}/lib64" "${LIBNVRTC_LIBRARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" /usr/lib64 /usr/local/cuda/lib64 REQUIRED)
find_library(CUDA_LIB cuda HINTS "${CUDA_TOOLKIT_ROOT_DIR}/lib64" "${LIBNVRTC_LIBRARY_DIR}" "${CUDA_TOOLKIT_ROOT_DIR}/lib/x64" /usr/lib64 /usr/local/cuda/lib64 REQUIRED)
target_link_libraries(sdrbase ${CUDA_LIBRARIES} ${CUDA_LIB} ${CUDA_NVRTC_LIB})
target_include_directories(sdrbase PUBLIC ${CUDA_INCLUDE_DIRS})
endif()
target_link_libraries(sdrbase
${OPUS_LIBRARIES}
${sdrbase_FFTW3F_LIB}
${sdrbase_SERIALDV_LIB}
2020-01-11 19:10:51 -05:00
${sdrbase_LIMERFE_LIB}
2020-11-09 20:09:21 -05:00
${sdrbase_LIBSIGMF_LIB}
Qt::Core
Qt::Multimedia
Qt::WebSockets
Qt::Positioning
httpserver
logging
qrtplib
swagger
)
2023-05-26 03:28:12 -04:00
if (LIBSIGMF_FOUND)
2023-05-26 10:47:52 -04:00
if(WIN32)
target_link_libraries(sdrbase optimized ${LIBSIGMF_LIBRARIES})
target_link_libraries(sdrbase debug ${LIBSIGMF_LIBRARIES_DEBUG})
else()
target_link_libraries(sdrbase ${LIBSIGMF_LIBRARIES})
endif()
2023-05-26 03:28:12 -04:00
endif()
if (Qt6_FOUND)
target_link_libraries(sdrbase
Qt::Core5Compat
Qt::CorePrivate
)
endif()
if(ANDROID AND NOT ENABLE_QT6)
target_link_libraries(sdrbase Qt::AndroidExtras)
endif()
if(ANDROID)
target_link_libraries(sdrbase log)
endif()
install(TARGETS sdrbase DESTINATION ${INSTALL_LIB_DIR})
if(WIN32 AND Qt6_FOUND)
# Run deployqt for Core5Compat
include(DeployQt)
windeployqt(sdrbase ${SDRANGEL_BINARY_BIN_DIR} "")
endif()
# Install debug symbols
if (WIN32)
install(FILES $<TARGET_PDB_FILE:sdrbase> CONFIGURATIONS Debug RelWithDebInfo DESTINATION ${INSTALL_LIB_DIR} )
endif()