From e99c3723e98eb6bfad8e9c564423edee6fc8a818 Mon Sep 17 00:00:00 2001 From: hobbes1069 Date: Fri, 12 Dec 2014 14:02:44 +0000 Subject: [PATCH] Add missing hamlib rig libraries and other tweakes. git-svn-id: https://svn.code.sf.net/p/freetel/code@1964 01035d8c-6547-0410-b346-abe4f91aad63 --- fdmdv2-dev/README.txt | 15 +++++++++++---- fdmdv2-dev/cmake/BuildSox.cmake | 2 +- fdmdv2/CMakeLists.txt | 18 ++++++++++++++++-- fdmdv2/cmake/BuildPortaudio.cmake | 6 +++++- fdmdv2/cmake/BuildSndfile.cmake | 4 ++-- 5 files changed, 35 insertions(+), 10 deletions(-) diff --git a/fdmdv2-dev/README.txt b/fdmdv2-dev/README.txt index f1f73836..f54ff34c 100644 --- a/fdmdv2-dev/README.txt +++ b/fdmdv2-dev/README.txt @@ -5,7 +5,8 @@ Quickstart 1 ----------- -Builds static versions of wxWidgets, portaudio, codec2-dev, which are commonly missing on many Linux systems, or of the wrong (older) version. +Builds static versions of wxWidgets, portaudio, codec2-dev, which are commonly +missing on many Linux systems, or of the wrong (older) version. Assuming the freedv-dev sources is checked out into ~/fdmdv2-dev: @@ -62,11 +63,17 @@ cmake -G"MSYS Makefiles" [other options] Bootstrapping wxWidgets build =============================== -If wxWidgets (>= 3.0) is not available then one option is to have CMake boot-strap the build for FreeDV. +If wxWidgets (>= 3.0) is not available then one option is to have CMake boot- +strap the build for FreeDV. -This is required because the tool wx-config is used to get the correct compiler and linker flags of the wxWidgets components needed by FreeDV. Since this is normally done at configure time, not during "make", it is not possible for CMake or have this information prior to building wxWidgets. +This is required because the tool wx-config is used to get the correct compiler +and linker flags of the wxWidgets components needed by FreeDV. Since this is +normally done at configure time, not during "make", it is not possible for CMake +or have this information prior to building wxWidgets. -In order to work around this issue you can "bootstrap" the wxWidgets build using the CMake option, "BOOTSTRAP_WXWIDGETS". wxWidgets will be built using static libraries. +In order to work around this issue you can "bootstrap" the wxWidgets build using +the CMake option, "BOOTSTRAP_WXWIDGETS". wxWidgets will be built using static +libraries. NOTE: This forces "USE_STATIC_WXWIDGETS" to be true internally regarless of the value set manually. diff --git a/fdmdv2-dev/cmake/BuildSox.cmake b/fdmdv2-dev/cmake/BuildSox.cmake index 403e10a7..8dae3adf 100644 --- a/fdmdv2-dev/cmake/BuildSox.cmake +++ b/fdmdv2-dev/cmake/BuildSox.cmake @@ -1,4 +1,4 @@ -set(SOX_TARBALL "sox-14.4.0") +set(SOX_TARBALL "sox-14.4.1") # required linking libraries on linux. Not sure about windows. find_library(ALSA_LIBRARIES asound) diff --git a/fdmdv2/CMakeLists.txt b/fdmdv2/CMakeLists.txt index eb0437af..20fe1d68 100644 --- a/fdmdv2/CMakeLists.txt +++ b/fdmdv2/CMakeLists.txt @@ -155,9 +155,23 @@ if(MINGW) hamlib-pcr.dll hamlib-prm80.dll hamlib-racal.dll - hamlib-rft.dll) + hamlib-rft.dll + hamlib-rotorez.dll + hamlib-rs.dll + hamlib-sartek.dll + hamlib-skanti.dll + hamlib-spid.dll + hamlib-tapr.dll + hamlib-tentec.dll + hamlib-ts7400.dll + hamlib-tuner.dll + hamlib-uniden.dll + hamlib-winradio.dll + hamlib-wj.dll + hamlib-yaesu.dll) message(STATUS "Checking for ${RUNTIME}") - find_library(${RUNTIME}_LIB ${RUNTIME}) + find_library(${RUNTIME}_LIB ${RUNTIME} + PATH_SUFFIXES hamlib) message(STATUS "runtime found: ${${RUNTIME}_LIB}") list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${${RUNTIME}_LIB}) endforeach() diff --git a/fdmdv2/cmake/BuildPortaudio.cmake b/fdmdv2/cmake/BuildPortaudio.cmake index 15aa7b2c..445b1e1a 100644 --- a/fdmdv2/cmake/BuildPortaudio.cmake +++ b/fdmdv2/cmake/BuildPortaudio.cmake @@ -9,7 +9,7 @@ On Linux systems try installing: alsa-lib-devel (RPM based systems) libasound2-dev (DEB based systems)" ) -endif(UNIX AND NOT ALSA_LIBRARIES) +endif() include(ExternalProject) ExternalProject_Add(portaudio @@ -33,5 +33,9 @@ else(WIN32) ) endif(WIN32) include_directories(${CMAKE_BINARY_DIR}/external/dist/include) + +# Add the portaudio library to the list of libraries that must be linked. list(APPEND FREEDV_LINK_LIBS ${PORTAUDIO_LIBRARIES}) + +# Setup a dependency so that this gets built before linking to freedv. list(APPEND FREEDV_STATIC_DEPS portaudio) diff --git a/fdmdv2/cmake/BuildSndfile.cmake b/fdmdv2/cmake/BuildSndfile.cmake index 91df48ef..91b48e3e 100644 --- a/fdmdv2/cmake/BuildSndfile.cmake +++ b/fdmdv2/cmake/BuildSndfile.cmake @@ -5,12 +5,12 @@ ExternalProject_Add(sndfile URL http://www.mega-nerd.com/libsndfile/files/${SNDFILE_TARBALL}.tar.gz BUILD_IN_SOURCE 1 INSTALL_DIR external/dist - CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR}/external/dist --disable-external-libs + CONFIGURE_COMMAND ./configure --prefix=${CMAKE_BINARY_DIR}/external/dist --disable-external-libs --disable-shared BUILD_COMMAND $(MAKE) INSTALL_COMMAND $(MAKE) install ) set(SNDFILE_LIBRARIES - ${CMAKE_BINARY_DIR}/external/dist/lib/libsndfile.a PARENT_SCOPE) + ${CMAKE_BINARY_DIR}/external/dist/lib/libsndfile.a) include_directories(${CMAKE_BINARY_DIR}/external/dist/include) list(APPEND FREEDV_LINK_LIBS ${SNDFILE_LIBRARIES}) list(APPEND FREEDV_STATIC_DEPS sndfile) -- 2.25.1