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})
if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(CMAKE_CL_64 TRUE)
endif()
-
configure_file(cmake/GetDependencies.cmake.in cmake/GetDependencies.cmake
@ONLY
)
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
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})
enable_language(RC)
set(CMAKE_RC_COMPILE_OBJECT
"<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
- # 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)
#
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}")
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})