From 27aab58d926d6d1c54be867435dfaf3ce6688ed8 Mon Sep 17 00:00:00 2001 From: ZigaS Date: Mon, 15 May 2017 12:32:16 +0200 Subject: [PATCH] MacOS(sierra) development environment. Updated qmake project configs. Deploy & Run script. For now only hardware supported is HackRF. --- ReadmeMacOS.md | 62 +++++++++++++++++++ apple_compat.c => apple/apple_compat.c | 5 +- apple_compat.h => apple/apple_compat.h | 4 +- apple/deploy.sh | 33 ++++++++++ apple/run.sh | 6 ++ devices/devices.pro | 21 +++++-- dsdcc/dsdcc.pro | 2 + fcdhid/CMakeLists.txt | 4 +- fcdhid/fcdhid.pro | 5 ++ fcdhid/hid-libusb.c | 2 +- mbelib/mbelib.pro | 1 + plugins/channelrx/chanalyzer/chanalyzer.pro | 1 + .../channelrx/chanalyzerng/chanalyzerng.pro | 1 + plugins/channelrx/demodatv/demodatv.pro | 1 + plugins/channelrx/demodbfm/demodbfm.pro | 1 + plugins/channelrx/demoddsd/demoddsd.pro | 3 + plugins/channeltx/modatv/modatv.pro | 2 + .../samplesink/hackrfoutput/hackrfoutput.pro | 6 +- .../samplesource/hackrfinput/hackrfinput.pro | 6 +- plugins/samplesource/rtlsdr/rtlsdr.pro | 6 +- plugins/samplesource/sdrdaemon/sdrdaemon.pro | 6 +- sdrangel.macos.pro | 16 +++-- sdrbase/dsp/dvserialengine.cpp | 2 + sdrbase/mainwindow.cpp | 2 +- sdrbase/sdrbase.pro | 23 ++++--- 25 files changed, 186 insertions(+), 35 deletions(-) create mode 100644 ReadmeMacOS.md rename apple_compat.c => apple/apple_compat.c (97%) rename apple_compat.h => apple/apple_compat.h (90%) create mode 100755 apple/deploy.sh create mode 100755 apple/run.sh diff --git a/ReadmeMacOS.md b/ReadmeMacOS.md new file mode 100644 index 000000000..4e8784172 --- /dev/null +++ b/ReadmeMacOS.md @@ -0,0 +1,62 @@ +# MacOS + +## Prerequisites for OSX (Sierra): +- Qt (used 5.6.2) +- XCode with MacPorts +- HackRF One + +We are only covering HackRF One, since is only the hardware I own. + +### Project dir structure: ++ . ++ build-sdrangel.macos-Desktop_Qt_5_6_2_clang_64bit-Release ++ SDRangel/ + + sdrangel + + deps + + dsdcc + + mbelib + + nanomsg ++ boost_1_64_0/ + +### Environment preparation +Boost 1.64: Download and unpack +There are a few dependencies which can be installed through MacPorts: +``` +sudo port install cmake hackrf-devel bladeRF rtl-sdr opencv +``` + +Clone other libs to deps folder: + +##### mbelib: +``` +git clone https://github.com/szechyjs/mbelib.git + +``` + +##### dsdcc: +``` +git clone https://github.com/f4exb/dsdcc.git + +``` + +##### nanomsg: +``` +git clone https://github.com/nanomsg/nanomsg.git +mkdir build && cd build +cmake -DCMAKE_INSTALL_PREFIX=/opt/local .. +cmake --build . && sudo cmake --build . --target install +``` + +## Build +Release build configuration with QT Creator + +## Deployment +Go into release build directory, something like: ```build-sdrangel.macos-Desktop_Qt_***Release``` +and run deployment script: +```../sdrangel/apple/deploy.sh``` + +## Run +from build directory: +```DYLD_LIBRARY_PATH=/opt/local/lib:.; ../MacOS/sdrangel``` +or +```../sdrangel/apple/run.sh``` diff --git a/apple_compat.c b/apple/apple_compat.c similarity index 97% rename from apple_compat.c rename to apple/apple_compat.c index 1270ed284..0fca664b7 100644 --- a/apple_compat.c +++ b/apple/apple_compat.c @@ -60,6 +60,7 @@ int pthread_barrier_wait(pthread_barrier_t *barrier) /** * Missing POSIX RealTime/Monotonic Clock */ +/* #include int clock_gettime(int clk_id, struct timespec *t) { @@ -73,5 +74,5 @@ int clock_gettime(int clk_id, struct timespec *t) { t->tv_nsec = nseconds; return 0; } - -#endif // APPLE Compatibility \ No newline at end of file +*/ +#endif // APPLE Compatibility diff --git a/apple_compat.h b/apple/apple_compat.h similarity index 90% rename from apple_compat.h rename to apple/apple_compat.h index 17feacfb2..ea583d3fa 100644 --- a/apple_compat.h +++ b/apple/apple_compat.h @@ -40,6 +40,4 @@ int pthread_barrier_wait(pthread_barrier_t *barrier); # define CLOCK_MONOTONIC 0 #endif -int clock_gettime(int clk_id, struct timespec *t); - -#endif // APPLE Compatibility \ No newline at end of file +#endif // APPLE Compatibility diff --git a/apple/deploy.sh b/apple/deploy.sh new file mode 100755 index 000000000..decb6f63d --- /dev/null +++ b/apple/deploy.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +# Run from build directory +test -d "app/sdrangel.app/Contents" || { echo "Please build first or chdir to proper folder!"; exit 1; } + +APP_LIB="app/sdrangel.app/Contents/lib" +APP_PLUGINS="${APP_LIB}/plugins" + +mkdir -p "${APP_PLUGINS}/channeltx" +mkdir -p "${APP_PLUGINS}/channelrx" +mkdir -p "${APP_PLUGINS}/samplesink" +mkdir -p "${APP_PLUGINS}/samplesource" + +cp -v fcdhid/libfcdhid.dylib $APP_LIB +cp -v fcdlib/libfcdlib.dylib $APP_LIB +cp -v lz4/liblz4.dylib $APP_LIB +cp -v mbelib/libmbelib.dylib $APP_LIB +cp -v sdrbase/libsdrbase.dylib $APP_LIB +cp -v devices/libdevices.dylib $APP_LIB +cp -v dsdcc/libdsdcc.dylib $APP_LIB + +for f in `find plugins/channelrx/ -name '*.dylib'`; do cp -v $f "${APP_PLUGINS}/channelrx/"; done +for f in `find plugins/channeltx/ -name '*.dylib'`; do cp -v $f "${APP_PLUGINS}/channeltx/"; done +for f in `find plugins/samplesink/ -name '*.dylib'`; do cp -v $f "${APP_PLUGINS}/samplesink/"; done +for f in `find plugins/samplesource/ -name '*.dylib'`; do cp -v $f "${APP_PLUGINS}/samplesource/"; done + +cd $APP_LIB +cp /opt/local/lib/libnanomsg.5.0.0.dylib . +ln -s libdsdcc.dylib libdsdcc.1.dylib +ln -s libdevices.dylib libdevices.1.dylib +ln -s liblz4.dylib liblz4.1.dylib +ln -s libsdrbase.dylib libsdrbase.1.dylib +ln -s libmbelib.dylib libmbelib.1.dylib diff --git a/apple/run.sh b/apple/run.sh new file mode 100755 index 000000000..dadc6ed62 --- /dev/null +++ b/apple/run.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +test -d app/sdrangel.app/Contents || { echo "Please build first or chdir to proper folder!"; exit 1; } + +cd app/sdrangel.app/Contents/lib +DYLD_LIBRARY_PATH=/opt/local/lib:.; ../MacOS/sdrangel diff --git a/devices/devices.pro b/devices/devices.pro index 723c3361b..6bb27fbe5 100644 --- a/devices/devices.pro +++ b/devices/devices.pro @@ -16,6 +16,7 @@ QMAKE_CXXFLAGS += -msse4.1 CONFIG(MINGW32):LIBBLADERFSRC = "D:\softs\bladeRF\host\libraries\libbladeRF\include" CONFIG(MINGW64):LIBBLADERFSRC = "D:\softs\bladeRF\host\libraries\libbladeRF\include" +CONFIG(macx):LIBHACKRFSRC = "/opt/local/include" CONFIG(MINGW32):LIBHACKRFSRC = "D:\softs\hackrf\host" CONFIG(MINGW64):LIBHACKRFSRC = "D:\softs\hackrf\host" CONFIG(MINGW32):LIBLIMESUITESRC = "D:\softs\LimeSuite" @@ -40,19 +41,21 @@ CONFIG(MINGW64)INCLUDEPATH += $$LIBLIMESUITESRC/external/cpp-feather-ini-parser CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug -SOURCES += bladerf/devicebladerf.cpp\ - bladerf/devicebladerfvalues.cpp\ - hackrf/devicehackrf.cpp\ +!macx:SOURCES += bladerf/devicebladerf.cpp\ + bladerf/devicebladerfvalues.cpp + +SOURCES += hackrf/devicehackrf.cpp\ hackrf/devicehackrfvalues.cpp CONFIG(MINGW64)SOURCES += limesdr/devicelimesdr.cpp\ limesdr/devicelimesdrparam.cpp\ limesdr/devicelimesdrshared.cpp -HEADERS += bladerf/devicebladerf.h\ +!macx:HEADERS -= bladerf/devicebladerf.h\ bladerf/devicebladerfparam.h\ - bladerf/devicebladerfvalues.h\ - hackrf/devicehackrf.h\ + bladerf/devicebladerfvalues.h + +HEADERS += hackrf/devicehackrf.h\ hackrf/devicehackrfparam.h\ hackrf/devicehackrfvalues.h\ @@ -64,3 +67,9 @@ LIBS += -L../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../libbladerf/$${build_subdir} -llibbladerf LIBS += -L../libhackrf/$${build_subdir} -llibhackrf CONFIG(MINGW64)LIBS += -L../liblimesuite/$${build_subdir} -lliblimesuite + +macx { + LIBS -= -L../libbladerf/$${build_subdir} -llibbladerf + LIBS -= -L../libhackrf/$${build_subdir} -llibhackrf + LIBS += -L/opt/local/lib -lhackrf +} diff --git a/dsdcc/dsdcc.pro b/dsdcc/dsdcc.pro index 530a985e6..e4ced1a58 100644 --- a/dsdcc/dsdcc.pro +++ b/dsdcc/dsdcc.pro @@ -11,9 +11,11 @@ TARGET = dsdcc CONFIG(MINGW32):LIBDSDCCSRC = "D:\softs\dsdcc" CONFIG(MINGW64):LIBDSDCCSRC = "D:\softs\dsdcc" +CONFIG(macx):LIBDSDCCSRC = "../../deps/dsdcc" CONFIG(MINGW32):LIBMBELIBSRC = "D:\softs\mbelib" CONFIG(MINGW64):LIBMBELIBSRC = "D:\softs\mbelib" +CONFIG(macx):LIBMBELIBSRC = "../../deps/mbelib" INCLUDEPATH += $$LIBDSDCCSRC INCLUDEPATH += $$LIBMBELIBSRC diff --git a/fcdhid/CMakeLists.txt b/fcdhid/CMakeLists.txt index df44433ac..668231c49 100644 --- a/fcdhid/CMakeLists.txt +++ b/fcdhid/CMakeLists.txt @@ -1,13 +1,13 @@ project(fcdhid) set(fcdhid_SOURCES - ../apple_compat.c + ../apple/apple_compat.c hid-libusb.c fcdhid.c ) set(fcdhid_HEADERS - ../apple_compat.h + ../apple/apple_compat.h fcdhid.h hid-libusb.h hidapi.h diff --git a/fcdhid/fcdhid.pro b/fcdhid/fcdhid.pro index b9bde1364..3b37e19bc 100644 --- a/fcdhid/fcdhid.pro +++ b/fcdhid/fcdhid.pro @@ -15,12 +15,17 @@ CONFIG(MINGW32):DEFINES += MINGW32=1 CONFIG(MINGW64):INCLUDEPATH += "D:\softs\libusb-1.0.20\include" CONFIG(MINGW64):DEFINES += MINGW32=1 +CONFIG(macx):INCLUDEPATH += "/opt/local/include" + SOURCES = $$PWD/hid-libusb.c\ $$PWD/fcdhid.c +macx:SOURCES += ../apple/apple_compat.c + HEADERS = $$PWD/fcdhid.h\ $$PWD/hid-libusb.h\ $$PWD/hidapi.h CONFIG(MINGW32):LIBS += -LD:\softs\libusb-1.0.20\MinGW32\dll -llibusb-1.0 -liconv CONFIG(MINGW64):LIBS += -LD:\softs\libusb-1.0.20\MinGW64\dll -llibusb-1.0 -liconv +CONFIG(macx):LIBS += -L/opt/local/lib -lusb-1.0 -liconv diff --git a/fcdhid/hid-libusb.c b/fcdhid/hid-libusb.c index fbed9bd4b..bdf8c089b 100644 --- a/fcdhid/hid-libusb.c +++ b/fcdhid/hid-libusb.c @@ -70,7 +70,7 @@ extern "C" { */ #ifdef __APPLE__ -#include "../apple_compat.h" +#include "../apple/apple_compat.h" #endif diff --git a/mbelib/mbelib.pro b/mbelib/mbelib.pro index 4d0344cf1..d4063254b 100644 --- a/mbelib/mbelib.pro +++ b/mbelib/mbelib.pro @@ -11,6 +11,7 @@ TARGET = mbelib CONFIG(MINGW32):LIBMBELIBSRC = "D:\softs\mbelib" CONFIG(MINGW64):LIBMBELIBSRC = "D:\softs\mbelib" +CONFIG(macx):LIBMBELIBSRC = "../../deps/mbelib" INCLUDEPATH += $$LIBMBELIBSRC diff --git a/plugins/channelrx/chanalyzer/chanalyzer.pro b/plugins/channelrx/chanalyzer/chanalyzer.pro index 90139e24b..84169aa9b 100644 --- a/plugins/channelrx/chanalyzer/chanalyzer.pro +++ b/plugins/channelrx/chanalyzer/chanalyzer.pro @@ -22,6 +22,7 @@ INCLUDEPATH += ../../../sdrbase CONFIG(ANDROID):INCLUDEPATH += /opt/softs/boost_1_60_0 CONFIG(MINGW32):INCLUDEPATH += "D:\boost_1_58_0" CONFIG(MINGW64):INCLUDEPATH += "D:\boost_1_58_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug diff --git a/plugins/channelrx/chanalyzerng/chanalyzerng.pro b/plugins/channelrx/chanalyzerng/chanalyzerng.pro index 3bd87bbea..f8feb541b 100644 --- a/plugins/channelrx/chanalyzerng/chanalyzerng.pro +++ b/plugins/channelrx/chanalyzerng/chanalyzerng.pro @@ -22,6 +22,7 @@ INCLUDEPATH += ../../../sdrbase CONFIG(ANDROID):INCLUDEPATH += /opt/softs/boost_1_60_0 CONFIG(MINGW32):INCLUDEPATH += "D:\boost_1_58_0" CONFIG(MINGW64):INCLUDEPATH += "D:\boost_1_58_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug diff --git a/plugins/channelrx/demodatv/demodatv.pro b/plugins/channelrx/demodatv/demodatv.pro index 7ab8a099c..814aa5df6 100644 --- a/plugins/channelrx/demodatv/demodatv.pro +++ b/plugins/channelrx/demodatv/demodatv.pro @@ -24,6 +24,7 @@ CONFIG(Debug):build_subdir = debug CONFIG(MINGW32):INCLUDEPATH += "D:\boost_1_58_0" CONFIG(MINGW64):INCLUDEPATH += "D:\boost_1_58_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" SOURCES += atvdemod.cpp\ atvdemodgui.cpp\ diff --git a/plugins/channelrx/demodbfm/demodbfm.pro b/plugins/channelrx/demodbfm/demodbfm.pro index 0cef6ea04..1a5794e90 100644 --- a/plugins/channelrx/demodbfm/demodbfm.pro +++ b/plugins/channelrx/demodbfm/demodbfm.pro @@ -22,6 +22,7 @@ INCLUDEPATH += ../../../sdrbase CONFIG(ANDROID):INCLUDEPATH += /opt/softs/boost_1_60_0 CONFIG(MINGW32):INCLUDEPATH += "D:\boost_1_58_0" CONFIG(MINGW64):INCLUDEPATH += "D:\boost_1_58_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug diff --git a/plugins/channelrx/demoddsd/demoddsd.pro b/plugins/channelrx/demoddsd/demoddsd.pro index a9078d66c..b82d9f32f 100644 --- a/plugins/channelrx/demoddsd/demoddsd.pro +++ b/plugins/channelrx/demoddsd/demoddsd.pro @@ -18,12 +18,15 @@ QMAKE_CXXFLAGS += -msse4.1 CONFIG(MINGW32):LIBDSDCCSRC = "D:\softs\dsdcc" CONFIG(MINGW64):LIBDSDCCSRC = "D:\softs\dsdcc" +CONFIG(macx):LIBDSDCCSRC = "../../../../deps/dsdcc" CONFIG(MINGW32):LIBMBELIBSRC = "D:\softs\mbelib" CONFIG(MINGW64):LIBMBELIBSRC = "D:\softs\mbelib" +CONFIG(macx):LIBMBELIBSRC = "../../../../deps/mbelib" CONFIG(MINGW32):INCLUDEPATH += "D:\boost_1_58_0" CONFIG(MINGW64):INCLUDEPATH += "D:\boost_1_58_0" +CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_64_0" INCLUDEPATH += $$PWD INCLUDEPATH += ../../../sdrbase diff --git a/plugins/channeltx/modatv/modatv.pro b/plugins/channeltx/modatv/modatv.pro index f80347cb3..7146bf018 100644 --- a/plugins/channeltx/modatv/modatv.pro +++ b/plugins/channeltx/modatv/modatv.pro @@ -24,6 +24,7 @@ CONFIG(Debug):build_subdir = debug CONFIG(MINGW32):INCLUDEPATH += "D:\softs\opencv\build\include" CONFIG(MINGW64):INCLUDEPATH += "D:\softs\opencv\build\include" +CONFIG(macx):INCLUDEPATH += "/opt/local/include" SOURCES += atvmod.cpp\ atvmodgui.cpp\ @@ -39,5 +40,6 @@ LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase CONFIG(MINGW32):LIBS += -LD:\softs\opencv\build\mw32\install\x86\mingw\bin -llibopencv_core2413 -llibopencv_highgui2413 -llibopencv_imgproc2413 CONFIG(MINGW64):LIBS += -LD:\softs\opencv\build\mw64\install\x64\mingw\bin -llibopencv_core2413 -llibopencv_highgui2413 -llibopencv_imgproc2413 +CONFIG(macx):LIBS += -L/opt/local/lib -lopencv_core -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_video -lopencv_videoio RESOURCES = ../../../sdrbase/resources/res.qrc diff --git a/plugins/samplesink/hackrfoutput/hackrfoutput.pro b/plugins/samplesink/hackrfoutput/hackrfoutput.pro index e9f21d973..0c753f627 100644 --- a/plugins/samplesink/hackrfoutput/hackrfoutput.pro +++ b/plugins/samplesink/hackrfoutput/hackrfoutput.pro @@ -21,7 +21,8 @@ CONFIG(MINGW64):LIBHACKRFSRC = "D:\softs\hackrf\host" INCLUDEPATH += $$PWD INCLUDEPATH += ../../../sdrbase INCLUDEPATH += ../../../devices -INCLUDEPATH += $$LIBHACKRFSRC +!macx:INCLUDEPATH += $$LIBHACKRFSRC +macx:INCLUDEPATH += /opt/local/include CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug @@ -41,7 +42,8 @@ HEADERS += hackrfoutputgui.h\ FORMS += hackrfoutputgui.ui LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase -LIBS += -L../../../libhackrf/$${build_subdir} -llibhackrf +!macx:LIBS += -L../../../libhackrf/$${build_subdir} -llibhackrf +macx:LIBS += -L/opt/local/lib -lhackrf LIBS += -L../../../devices/$${build_subdir} -ldevices RESOURCES = ../../../sdrbase/resources/res.qrc diff --git a/plugins/samplesource/hackrfinput/hackrfinput.pro b/plugins/samplesource/hackrfinput/hackrfinput.pro index 4b3f22c5b..e7b313c8d 100644 --- a/plugins/samplesource/hackrfinput/hackrfinput.pro +++ b/plugins/samplesource/hackrfinput/hackrfinput.pro @@ -21,7 +21,8 @@ CONFIG(MINGW64):LIBHACKRFSRC = "D:\softs\hackrf\host" INCLUDEPATH += $$PWD INCLUDEPATH += ../../../sdrbase INCLUDEPATH += ../../../devices -INCLUDEPATH += $$LIBHACKRFSRC +!macx:INCLUDEPATH += $$LIBHACKRFSRC +macx:INCLUDEPATH += /opt/local/include CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug @@ -41,7 +42,8 @@ HEADERS += hackrfinputgui.h\ FORMS += hackrfinputgui.ui LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase -LIBS += -L../../../libhackrf/$${build_subdir} -llibhackrf +!macx:LIBS += -L../../../libhackrf/$${build_subdir} -llibhackrf +macx:LIBS += -L/opt/local/lib -lhackrf LIBS += -L../../../devices/$${build_subdir} -ldevices RESOURCES = ../../../sdrbase/resources/res.qrc diff --git a/plugins/samplesource/rtlsdr/rtlsdr.pro b/plugins/samplesource/rtlsdr/rtlsdr.pro index 181662065..c7ed8042a 100644 --- a/plugins/samplesource/rtlsdr/rtlsdr.pro +++ b/plugins/samplesource/rtlsdr/rtlsdr.pro @@ -20,7 +20,8 @@ CONFIG(MINGW32):LIBRTLSDRSRC = "D:\softs\librtlsdr" CONFIG(MINGW64):LIBRTLSDRSRC = "D:\softs\librtlsdr" INCLUDEPATH += $$PWD INCLUDEPATH += ../../../sdrbase -INCLUDEPATH += $$LIBRTLSDRSRC/include +!macx:INCLUDEPATH += $$LIBRTLSDRSRC/include +macx:INCLUDEPATH += /opt/local/include CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug @@ -40,6 +41,7 @@ HEADERS += rtlsdrgui.h\ FORMS += rtlsdrgui.ui LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase -LIBS += -L../../../librtlsdr/$${build_subdir} -llibrtlsdr +!macx:LIBS += -L../../../librtlsdr/$${build_subdir} -llibrtlsdr +macx:LIBS += -L/opt/local/lib -lrtlsdr RESOURCES = ../../../sdrbase/resources/res.qrc diff --git a/plugins/samplesource/sdrdaemon/sdrdaemon.pro b/plugins/samplesource/sdrdaemon/sdrdaemon.pro index 7b25195be..5a6013883 100644 --- a/plugins/samplesource/sdrdaemon/sdrdaemon.pro +++ b/plugins/samplesource/sdrdaemon/sdrdaemon.pro @@ -22,7 +22,8 @@ CONFIG(MINGW64):LIBNANOMSGSRC = "D:\softs\nanomsg-0.8-beta" INCLUDEPATH += $$PWD INCLUDEPATH += ../../../sdrbase INCLUDEPATH += ../../../lz4 -INCLUDEPATH += $$LIBNANOMSGSRC/src +!macx:INCLUDEPATH += $$LIBNANOMSGSRC/src +macx:INCLUDEPATH += /opt/local/include CONFIG(Release):build_subdir = release CONFIG(Debug):build_subdir = debug @@ -43,7 +44,8 @@ FORMS += sdrdaemongui.ui LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase LIBS += -L../../../lz4/$${build_subdir} -llz4 -LIBS += -L../../../nanomsg/$${build_subdir} -lnanomsg +!macx:LIBS += -L../../../nanomsg/$${build_subdir} -lnanomsg +macx:LIBS += -L/opt/local/lib -lnanomsg RESOURCES = ../../../sdrbase/resources/res.qrc diff --git a/sdrangel.macos.pro b/sdrangel.macos.pro index 88e567c61..de52e5b0e 100644 --- a/sdrangel.macos.pro +++ b/sdrangel.macos.pro @@ -6,19 +6,24 @@ TEMPLATE = subdirs SUBDIRS = sdrbase +SUBDIRS += devices SUBDIRS += lz4 -SUBDIRS += librtlsdr -SUBDIRS += libhackrf -SUBDIRS += libairspy +SUBDIRS += fcdhid +SUBDIRS += fcdlib +SUBDIRS += mbelib +SUBDIRS += dsdcc SUBDIRS += plugins/samplesource/filesource SUBDIRS += plugins/samplesource/sdrdaemon SUBDIRS += plugins/samplesource/rtlsdr -SUBDIRS += plugins/samplesource/hackrf -SUBDIRS += plugins/samplesource/airspy +SUBDIRS += plugins/samplesource/hackrfinput SUBDIRS += plugins/samplesink/filesink +SUBDIRS += plugins/samplesink/hackrfoutput SUBDIRS += plugins/channelrx/chanalyzer +SUBDIRS += plugins/channelrx/chanalyzerng SUBDIRS += plugins/channelrx/demodam +SUBDIRS += plugins/channelrx/demodatv SUBDIRS += plugins/channelrx/demodbfm +SUBDIRS += plugins/channelrx/demoddsd SUBDIRS += plugins/channelrx/demodlora SUBDIRS += plugins/channelrx/demodnfm SUBDIRS += plugins/channelrx/demodssb @@ -26,6 +31,7 @@ SUBDIRS += plugins/channelrx/demodwfm SUBDIRS += plugins/channelrx/tcpsrc SUBDIRS += plugins/channelrx/udpsrc SUBDIRS += plugins/channeltx/modam +SUBDIRS += plugins/channeltx/modatv SUBDIRS += plugins/channeltx/modnfm SUBDIRS += plugins/channeltx/modssb SUBDIRS += plugins/channeltx/modwfm diff --git a/sdrbase/dsp/dvserialengine.cpp b/sdrbase/dsp/dvserialengine.cpp index 2f50a1c3c..901d9f289 100644 --- a/sdrbase/dsp/dvserialengine.cpp +++ b/sdrbase/dsp/dvserialengine.cpp @@ -28,8 +28,10 @@ #ifndef __WINDOWS__ #include #include +#ifndef __APPLE__ #include #endif +#endif #include #include diff --git a/sdrbase/mainwindow.cpp b/sdrbase/mainwindow.cpp index 2abaa544e..028f462b3 100644 --- a/sdrbase/mainwindow.cpp +++ b/sdrbase/mainwindow.cpp @@ -138,7 +138,7 @@ MainWindow::MainWindow(QWidget* parent) : if (sampleSourceIndex < 0) { qCritical("MainWindow::MainWindow: no sample source. Exit"); - exit(0); + exit(0); } bool sampleSourceSignalsBlocked = m_deviceUIs.back()->m_samplingDeviceControl->getDeviceSelector()->blockSignals(true); diff --git a/sdrbase/sdrbase.pro b/sdrbase/sdrbase.pro index 21ee5c8cf..2c706dafd 100644 --- a/sdrbase/sdrbase.pro +++ b/sdrbase/sdrbase.pro @@ -12,8 +12,10 @@ TARGET = sdrbase INCLUDEPATH += $$PWD DEFINES += USE_KISSFFT=1 -DEFINES += __WINDOWS__=1 -DEFINES += DSD_USE_SERIALDV=1 +win32 { + DEFINES += __WINDOWS__=1 + DEFINES += DSD_USE_SERIALDV=1 +} DEFINES += USE_SSE2=1 QMAKE_CXXFLAGS += -msse2 DEFINES += USE_SSE4_1=1 @@ -30,6 +32,17 @@ CONFIG(MINGW64):INCLUDEPATH += "D:\boost_1_58_0" CONFIG(MINGW32):INCLUDEPATH += "D:\softs\serialDV" CONFIG(MINGW64):INCLUDEPATH += "D:\softs\serialDV" +CONFIG(macx):INCLUDEPATH += "../../../boost_1_64_0" + +win32 { + HEADERS += \ + dsp/dvserialengine.h \ + dsp/dvserialworker.h + SOURCES += \ + dsp/dvserialengine.cpp \ + dsp/dvserialworker.cpp +} + SOURCES += mainwindow.cpp\ audio/audiodeviceinfo.cpp\ audio/audiofifo.cpp\ @@ -48,8 +61,6 @@ SOURCES += mainwindow.cpp\ dsp/dspengine.cpp\ dsp/dspdevicesourceengine.cpp\ dsp/dspdevicesinkengine.cpp\ - dsp/dvserialengine.cpp\ - dsp/dvserialworker.cpp\ dsp/fftengine.cpp\ dsp/kissengine.cpp\ dsp/fftfilt.cxx\ @@ -141,8 +152,6 @@ HEADERS += mainwindow.h\ dsp/dspengine.h\ dsp/dspdevicesourceengine.h\ dsp/dspdevicesinkengine.h\ - dsp/dvserialengine.h\ - dsp/dvserialworker.h\ dsp/dsptypes.h\ dsp/fftengine.h\ dsp/fftfilt.h\ @@ -249,7 +258,7 @@ FORMS += mainwindow.ui\ RESOURCES = resources/res.qrc -LIBS += -L../serialdv/$${build_subdir} -lserialdv +!macx:LIBS += -L../serialdv/$${build_subdir} -lserialdv CONFIG(ANDROID):CONFIG += mobility CONFIG(ANDROID):MOBILITY =