Skip to content

Commit

Permalink
Build GGMorse in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
f4exb committed May 21, 2024
1 parent 176fe03 commit d308127
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 1 deletion.
1 change: 1 addition & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ for:
- sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES" ]]; then bash cmake/ci/build_airspyhf.sh; fi
- sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES" ]]; then bash cmake/ci/build_rtlsdr.sh; fi
- sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES" ]]; then bash cmake/ci/build_limesuite.sh; fi
- sh: if [[ ! "${CMAKE_CUSTOM_OPTIONS}" =~ "ENABLE_EXTERNAL_LIBRARIES" ]]; then bash cmake/ci/build_ggmorse.sh; fi
- sh: bash cmake/ci/build_sdrplay.sh
before_build:
- sh: bash -c export
Expand Down
13 changes: 13 additions & 0 deletions cmake/ci/build_ggmorse.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

cd $HOME
mkdir -p external && cd external
mkdir -p f4exb && cd f4exb

git clone https://github.com/f4exb/ggmorse.git

cd ggmorse
mkdir -p build && cd build
cmake -DGGMORSE_BUILD_TESTS=OFF -DGGMORSE_BUILD_EXAMPLES=OFF ..
sudo make install
sudo ldconfig
32 changes: 32 additions & 0 deletions external/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,38 @@ if(ENABLE_FEATURE_SATELLITETRACKER OR ENABLE_CHANNELRX_DEMODAPT)
endif ()
endif ()

# For Morse Decoder feature
if(ENABLE_FEATURE_MORSEDECODER)
if (WIN32)
set(GGMORSE_LIBRARIES "${SDRANGEL_BINARY_LIB_DIR}/ggmorse.lib" CACHE INTERNAL "")
elseif (LINUX)
set(GGMORSE_LIBRARIES "${EXTERNAL_BUILD_LIBRARIES}/lib${LIB_SUFFIX}/libggmorse${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
endif()
ExternalProject_Add(ggmorse
GIT_REPOSITORY https://github.com/f4exb/ggmorse.git
PREFIX "${EXTERNAL_BUILD_LIBRARIES}/ggmorse"
CMAKE_ARGS ${COMMON_CMAKE_ARGS}
-DGGMORSE_BUILD_TESTS=OFF
-DGGMORSE_BUILD_EXAMPLES=OFF
BUILD_BYPRODUCTS "${GGMORSE_LIBRARIES}"
INSTALL_COMMAND ""
TEST_COMMAND ""
)
ExternalProject_Get_Property(ggmorse source_dir binary_dir)
set(GGMORSE_DEPENDS ggmorse CACHE INTERNAL "")
set_global_cache(GGMORSE_FOUND ON)
set(GGMORSE_EXTERNAL ON CACHE INTERNAL "")
set(GGMORSE_INCLUDE_DIR "${EXTERNAL_BUILD_LIBRARIES}/ggmorse/src" CACHE INTERNAL "")
if (WIN32)
install(FILES "${SDRANGEL_BINARY_BIN_DIR}/ggmorse${CMAKE_SHARED_LIBRARY_SUFFIX}" DESTINATION "${INSTALL_LIB_DIR}")
elseif (APPLE)
set(GGMORSE_LIBRARIES "${binary_dir}/libsggmorse/libggmorse${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE INTERNAL "")
install(DIRECTORY "${binary_dir}/libggmorse" DESTINATION "${INSTALL_LIB_DIR}"
FILES_MATCHING PATTERN "libggmorse*${CMAKE_SHARED_LIBRARY_SUFFIX}")
set(MACOS_EXTERNAL_LIBS_FIXUP "${MACOS_EXTERNAL_LIBS_FIXUP};${binary_dir}/libggmorse")
endif ()
endif()

# VkFFT (header only library)
ExternalProject_Add(vkfft
GIT_REPOSITORY https://github.com/DTolm/VkFFT.git
Expand Down
2 changes: 1 addition & 1 deletion plugins/feature/morsedecoder/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This plugin uses the demodulated audio of some Rx channel plugins.

- AM demodulator
- NFM demodulator
- SSB demodulator
- SSB demodulator (use mono audio - not binaural)
- WFM demodulator

Typical sequence of operations:
Expand Down

0 comments on commit d308127

Please sign in to comment.