cropinghigh / sdrpp-vhfvoiceradio

NFM demod with CTCSS/DCS and DSD
GNU General Public License v3.0
9 stars 5 forks source link

Is it possible to compile macOS binaries via CI? #7

Open boybook opened 2 months ago

boybook commented 2 months ago

I tried to compile in macOS and installed all the dependencies, but had problems with sdrpp-headers-git, so it didn't work. Please help me.

Wonkaski commented 2 months ago

I also can't get this to work on Mac, it stops building at the step of "make". Don't quite know how SDR++ building with 3rd party plugin works, and there is quite little information about this on the Internet.

Really want to get this and the tetra plugin to work on my SDR++, but trial and error seems not helping me out here.

boybook commented 2 months ago

@Wonkaski Finally I got it to work, but with some strange modifications to the CMakefile. Here are my modifications and the compiled binary.

image image

But I'm still looking for a way to compile gracefully via CI...

You need to compile sdrpp properly, for example the build folder is: /path/to/your/sdrpp/build

cmake_minimum_required(VERSION 3.13)
project(vhfvoiceradio)

set(CMAKE_INSTALL_PREFIX "/usr/")
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")

file(GLOB_RECURSE SRC "src/*.cpp" "src/*.h" "src/*.hpp" "src/*.c")

find_package(MBE REQUIRED)
find_package(ITPP REQUIRED)

if (NOT SDRPP_MODULE_CMAKE)
    set(SDRPP_MODULE_CMAKE "/path/to/your/sdrpp/build/sdrpp_module.cmake")
endif()

# include homebrew libs
include_directories(/opt/homebrew/include)
link_directories(/usr/local/lib /opt/homebrew/lib)

include(${SDRPP_MODULE_CMAKE})

# use fftw3f instead. (install with `brew install fftw`)
target_link_libraries(vhfvoiceradio PRIVATE fftw3f volk ${ITPP_LIBRARY} ${MBE_LIBRARY})

target_include_directories(vhfvoiceradio PRIVATE "src/" ${MBE_INCLUDE_DIR} ${ITPP_INCLUDE_DIR} "/path/to/your/sdrpp/core/src/" "/path/to/your/sdrpp/core/src/imgui/")

vhfvoiceradio.dylib.zip

Roslund commented 1 month ago

Thank you @boybook, worked like a charm.