Build configuration updates to support win32 build.
authorhobbes1069 <hobbes1069@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 4 Aug 2015 19:00:03 +0000 (19:00 +0000)
committerhobbes1069 <hobbes1069@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 4 Aug 2015 19:00:03 +0000 (19:00 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@2254 01035d8c-6547-0410-b346-abe4f91aad63

fdmdv2-dev/CMakeLists.txt
fdmdv2-dev/cmake/BuildSox.cmake

index 49c664d1a47f598a3ba3c5547dc9ac8cb7a4520b..8b17821f9623e0bc52eb7e58e9294d9fd0b3d0df 100644 (file)
@@ -126,6 +126,8 @@ else(BOOTSTRAP_WXWIDGETS AND NOT EXISTS ${WXCONFIG})
 #
 if(MINGW)
     message(STATUS "System is MinGW.")
+    # Setup HOST variable.
+    include(cmake/MinGW.cmake)
     # This sets up the exe icon for windows under mingw.
     set(RES_FILES "")
     set(RES_FILES "${CMAKE_SOURCE_DIR}/contrib/freedv.rc")
index adfd5a1dd82134ad4570d9432e4e18e0ccf12d00..d54488b3e14a2c6c604fbceab679fa2cc9f318b9 100644 (file)
@@ -3,6 +3,7 @@ set(SOX_TARBALL "sox-14.4.1")
 # required linking libraries on linux. Not sure about windows.
 find_library(ALSA_LIBRARIES asound)
 find_library(AO_LIBRARIES ao)
+find_library(GSM_LIBRARIES gsm)
 
 if(UNIX AND NOT ALSA_LIBRARIES)
     message(ERROR "Could not find alsa library.
@@ -21,7 +22,7 @@ On Linux systems try installing:
 endif(UNIX AND NOT AO_LIBRARIES)
 
 if(MINGW AND CMAKE_CROSSCOMPILING)
-    set(CONFIGURE_COMMAND ./configure --build=${HOST} --host=${HOST} --target=${HOST} --enable-shared=no --without-id3tag --without-png --disable-gomp --with-oggvorbis=no --with-oss=no --with-flac=no --with-amrnb=no --with-amrwb=no --with-mp3=no --with-wavpack=no --disable-dl-sndfile --with-pulseaudio=no --without-magic --with-gsm --prefix=${CMAKE_BINARY_DIR}/external/dist)
+    set(CONFIGURE_COMMAND ./configure --host=${HOST} --enable-shared=no --without-id3tag --without-png --disable-gomp --with-oggvorbis=no --with-oss=no --with-flac=no --with-amrnb=no --with-amrwb=no --with-mp3=no --with-wavpack=no --disable-dl-sndfile --with-pulseaudio=no --without-magic --with-gsm --prefix=${CMAKE_BINARY_DIR}/external/dist)
 else()
     set(CONFIGURE_COMMAND ./configure --enable-shared=no --without-id3tag --without-png --disable-gomp --with-oggvorbis=no --with-oss=no --with-flac=no --with-amrnb=no --with-amrwb=no --with-mp3=no --with-wavpack=no --disable-dl-sndfile --with-pulseaudio=no --without-magic --with-gsm --prefix=${CMAKE_BINARY_DIR}/external/dist)
 endif()
@@ -37,7 +38,7 @@ ExternalProject_Add(sox
 )
 set(SOX_LIBRARIES ${CMAKE_BINARY_DIR}/external/dist/lib/libsox.a)
 if(UNIX)
-    list(APPEND SOX_LIBRARIES ${ALSA_LIBRARIES} ${AO_LIBRARIES})
+    list(APPEND SOX_LIBRARIES ${ALSA_LIBRARIES} ${AO_LIBRARIES} ${GSM_LIBRARIES})
 endif()
 if(MINGW)
     list(APPEND SOX_LIBRARIES winmm)