Skip to content

Build OSX

Vincent Sonnier edited this page Jan 14, 2023 · 42 revisions

OSX Build Instructions (Homebrew / MacPorts):

Prerequisites

You need to have XCode and macports / homebrew installed.

Build / Install liquid-dsp

You can use MacPorts or Brew for this part.

MacPorts:

$ sudo port install liquid-dsp cmake
.. installing ..

Homebrew:

$ brew install automake cmake
.. installing ..
$ git clone https://github.com/jgaeddert/liquid-dsp.git
$ cd liquid-dsp
liquid-dsp$ ./bootstrap.sh
liquid-dsp$ ./configure --enable-fftoverride CFLAGS="-O3"
.. configuring ..
liquid-dsp$ make -j4
.. building ..
liquid-dsp$ sudo make install
.. installing ..

Build wxWidgets

Substitute your own user paths where appropriate.

$ mkdir ~/Dev
$ cd ~/Dev
Dev$ mkdir wxWidgets-build
Dev$ cd wxWidgets-build
Dev$ wget https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.1/wxWidgets-3.2.1.tar.bz2
Dev$ tar -xvjpf wxWidgets-3.2.1.tar.bz2
... unpacking ...
Dev$ cd wxWidgets-3.2.1
wxWidgets-3.2.1$ ./configure --prefix=/Users/(YOUR_USERNAME)/Dev/wxWidgets-staticlib --with-opengl --disable-glcanvasegl --disable-shared --enable-monolithic --with-libjpeg --with-libtiff --with-libpng --with-zlib --with-mac --disable-sdltest --enable-unicode --enable-display --enable-propgrid --disable-webview --disable-webviewwebkit CXXFLAGS="-std=c++0x" --with-libiconv=/usr
... configuring ...
wxWidgets-3.2.1$ make -j4 && make install
... building, installing ...

Build SoapySDR

Always ensure to update, build and install SoapySDR before building dependent projects.

$ cd ~/Dev
Dev$ git clone https://github.com/pothosware/SoapySDR.git
Dev$ cd SoapySDR
SoapySDR$ mkdir build
SoapySDR$ cd build
build$ cmake .. -DCMAKE_BUILD_TYPE=Release
build$ make
build$ sudo make install
build$ SoapySDRUtil --info

Build CubicSDR

Note: add -DUSE_HAMLIB=1 to cmake command line to include hamlib support.

$ git clone https://github.com/cjcliffe/CubicSDR.git
.. cloning ..
$ cd CubicSDR
$ mkdir build
$ cd build
build$ cmake ../ -DwxWidgets_CONFIG_EXECUTABLE=/Users/(YOUR_USERNAME)/Dev/wxWidgets-staticlib/bin/wx-config -DCMAKE_BUILD_TYPE=Release -DBUNDLE_APP=1 -DCPACK_BINARY_DRAGNDROP=1
... generating ...
-- Build files have been written to: .../CubicSDR/build
build$ cpack
.. compiling / bundling ..

CubicSDR.app should now be built as x64/CubicSDR.app as well as a .DMG bundle (and possibly some other default bundles)

Example Support Modules:

SoapyRTLSDR (similar to other Soapy modules):

Dependencies via MacPorts:

$ sudo port install rtl-sdr

Dependencies via Homebrew:

$ brew install rtl-sdr

Build Module:

$ cd ~/Dev
Dev$ git clone https://github.com/pothosware/SoapyRTLSDR.git
Dev$ cd SoapyRTLSDR
SoapyRTLSDR$ mkdir build
SoapyRTLSDR$ cd build
build$ cmake .. -DCMAKE_BUILD_TYPE=Release
build$ make
build$ sudo make install
build$ SoapySDRUtil --probe

SoapySDRPlay:

Alternately latest SoapySDRPlay package may be available from www.sdrplay.com/mac.html

$ cd ~/Dev
Dev$ git clone https://github.com/pothosware/SoapySDRPlay.git
Dev$ cd SoapySDRPlay
SoapySDRPlay$ mkdir build
SoapySDRPlay$ cd build
build$ cmake .. -DCMAKE_BUILD_TYPE=Release
build$ make
build$ sudo make install
build$ SoapySDRUtil --probe