From: hobbes1069 Date: Thu, 26 Jan 2017 18:51:42 +0000 (+0000) Subject: Tweaks for MinGW. Still a work in progress. X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=0e2b41f9a38eba4d2fdf1bfb85d2c7b0bbc39b0b;p=freetel-svn-tracking.git Tweaks for MinGW. Still a work in progress. git-svn-id: https://svn.code.sf.net/p/freetel/code@2999 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/CMakeLists.txt b/codec2-dev/CMakeLists.txt index dd39b448..e43e79f4 100644 --- a/codec2-dev/CMakeLists.txt +++ b/codec2-dev/CMakeLists.txt @@ -69,7 +69,7 @@ endif() message(STATUS "Build type is: " ${CMAKE_BUILD_TYPE}) string(TOUPPER ${CMAKE_BUILD_TYPE} _FLAGS) -if(NOT "_FLAGS" STREQUAL "NONE") +if(NOT _FLAGS STREQUAL "NONE") set(BUILD_FLAGS "${CMAKE_C_FLAGS_${_FLAGS}}") endif() message(STATUS "Compiler Flags: " ${BUILD_FLAGS}) @@ -186,7 +186,6 @@ if(WIN32) if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) set(CMAKE_CL_64 TRUE) endif() - configure_file(cmake/GetDependencies.cmake.in cmake/GetDependencies.cmake @ONLY ) @@ -216,7 +215,8 @@ endif(WIN32) configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/codec2.pc.in ${CMAKE_CURRENT_BINARY_DIR}/codec2.pc -@ONLY) + @ONLY +) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/codec2.pc diff --git a/codec2-dev/cmake/GetDependencies.cmake.in b/codec2-dev/cmake/GetDependencies.cmake.in index 067ad5e8..0d25f670 100644 --- a/codec2-dev/cmake/GetDependencies.cmake.in +++ b/codec2-dev/cmake/GetDependencies.cmake.in @@ -11,8 +11,8 @@ set(CMAKE_SYSTEM_LIBRARY_PATH @CMAKE_SYSTEM_LIBRARY_PATH@) set(CMAKE_FIND_ROOT_PATH @CMAKE_FIND_ROOT_PATH@) set(CODEC2_DLL ${CMAKE_BINARY_DIR}/src/libcodec2.dll) -include(GetPrerequisites) -get_prerequisites(${CODEC2_DLL} _deps 1 1 "" "") +include(${CMAKE_SOURCE_DIR}/cmake/GetPrerequisites.cmake) +get_prerequisites(${CODEC2_DLL} _deps 1 0 "" "") foreach(_runtime ${_deps}) message("Looking for ${_runtime}") find_library(RUNTIME_${_runtime} ${_runtime}) diff --git a/freedv-dev/CMakeLists.txt b/freedv-dev/CMakeLists.txt index 4e26437e..5f575797 100644 --- a/freedv-dev/CMakeLists.txt +++ b/freedv-dev/CMakeLists.txt @@ -137,51 +137,6 @@ if(MINGW) enable_language(RC) set(CMAKE_RC_COMPILE_OBJECT " -O coff -i -o ") - # These are DLOPEN'ed and can't be automatically pulled in by dependency. - foreach(RUNTIME - hamlib-adat.dll - hamlib-alinco.dll - hamlib-amsat.dll - hamlib-aor.dll - hamlib-ars.dll - hamlib-celestron.dll - hamlib-drake.dll - hamlib-dummy.dll - hamlib-easycomm.dll - hamlib-flexradio.dll - hamlib-fodtrack.dll - hamlib-gs232a.dll - hamlib-heathkit.dll - hamlib-icom.dll - hamlib-jrc.dll - hamlib-kachina.dll - hamlib-kenwood.dll - hamlib-kit.dll - hamlib-lowe.dll - hamlib-m2.dll - hamlib-pcr.dll - hamlib-prm80.dll - hamlib-racal.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} - PATH_SUFFIXES hamlib) - message(STATUS "runtime found: ${${RUNTIME}_LIB}") - list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${${RUNTIME}_LIB}) - endforeach() include(InstallRequiredSystemLibraries) endif(MINGW) @@ -423,7 +378,7 @@ endif(wxWidgets_FOUND) # if(NOT USE_STATIC_SPEEXDSP) message(STATUS "Looking for Speex DSP library.") - find_path(SPEEXDSP_INCLUDE_DIR speex/speex.h) + find_path(SPEEXDSP_INCLUDE_DIR NAMES speex/speex.h speex/speexdsp_types.h) find_library(SPEEXDSP_LIBRARY speexdsp) message(STATUS " Speex DSP headers: ${SPEEXDSP_INCLUDE_DIR}") message(STATUS " Speex DSP library: ${SPEEXDSP_LIBRARY}") diff --git a/freedv-dev/cmake/GetDependencies.cmake.in b/freedv-dev/cmake/GetDependencies.cmake.in index 93204dd7..a0767601 100644 --- a/freedv-dev/cmake/GetDependencies.cmake.in +++ b/freedv-dev/cmake/GetDependencies.cmake.in @@ -13,7 +13,7 @@ set(CMAKE_FIND_ROOT_PATH @CMAKE_FIND_ROOT_PATH@) set(FREEDV_EXE ${CMAKE_BINARY_DIR}/src/freedv.exe) include(GetPrerequisites) -get_prerequisites("${FREEDV_EXE}" _deps 1 1 "" "${CMAKE_SYSTEM_LIBRARY_PATH}") +get_prerequisites("${FREEDV_EXE}" _deps 1 0 "" "") foreach(_runtime ${_deps}) message("Looking for ${_runtime}") find_library(RUNTIME_${_runtime} ${_runtime})