Tweaks for win32/mingw building. Need to compare to codec2-dev and propagate changes...
authorhobbes1069 <hobbes1069@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 15 Aug 2014 18:02:57 +0000 (18:02 +0000)
committerhobbes1069 <hobbes1069@01035d8c-6547-0410-b346-abe4f91aad63>
Fri, 15 Aug 2014 18:02:57 +0000 (18:02 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1804 01035d8c-6547-0410-b346-abe4f91aad63

codec2/CMakeLists.txt
codec2/src/CMakeLists.txt
fdmdv2/CMakeLists.txt

index 396239b321fe1ab1c21c89fcb187bebc8e437259..0969437b5e9e9b5cd5082d1bfe51b0b2b9354f0d 100644 (file)
@@ -44,7 +44,8 @@ message(STATUS "codec2 version: ${CODEC2_VERSION}")
 if(NOT CMAKE_BUILD_TYPE)
     set(CMAKE_BUILD_TYPE "Release")
 endif(NOT CMAKE_BUILD_TYPE)
-message(STATUS "Build type is: ${CMAKE_BUILD_TYPE}")
+message(STATUS "Build type is: " ${CMAKE_BUILD_TYPE})
+message(STATUS "Compiler Flags: " ${CMAKE_CXX_FLAGS})
 
 #
 # Setup Windows/MinGW specifics here.
@@ -52,12 +53,16 @@ message(STATUS "Build type is: ${CMAKE_BUILD_TYPE}")
 if(MINGW)
     message(STATUS "System is MinGW.")
     foreach(RUNTIME
-        libgcc_s_sjlj-1.dll
-        libstdc++-6.dll)
+               gcc_s_sjlj-1
+               gcc_s_dw2-1
+               stdc++-6
+       )
         message(STATUS "Checking for ${RUNTIME}")
         find_library(${RUNTIME}_LIB ${RUNTIME})
         message(STATUS "runtime found: ${${RUNTIME}_LIB}")
-        list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${${RUNTIME}_LIB})
+               if(${${RUNTIME}_LIB}_FOUND)
+                       list(APPEND CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS ${${RUNTIME}_LIB})
+               endif()
     endforeach()
 endif(MINGW)
 
index 9748736920428560c53f9549686b595af9f259f9..1e956f25702de8c75f6f377dad6edb333f5b0d73 100644 (file)
@@ -82,12 +82,10 @@ set(CODEBOOKSGE ${D}/gecb.txt)
 
 # when crosscompiling import the executable targets from a file
 if(CMAKE_CROSSCOMPILING)
-    SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Point it to the export file from a native build")
+    SET(IMPORT_EXECUTABLES "IMPORTFILE-NOTFOUND" CACHE FILEPATH "Point to the export file from a native build")
     INCLUDE(${IMPORT_EXECUTABLES})
-endif(CMAKE_CROSSCOMPILING)
-
+else(CMAKE_CROSSCOMPILING)
 # Build code generator binaries. These do not get installed.
-if(NOT CMAKE_CROSSCOMPILING)
     # generate_codebook
     add_executable(generate_codebook generate_codebook.c)
     target_link_libraries(generate_codebook ${CMAKE_REQUIRED_LIBRARIES})
@@ -97,7 +95,8 @@ if(NOT CMAKE_CROSSCOMPILING)
     # Make native builds available for cross-compiling.
     export(TARGETS generate_codebook genlspdtcb
         FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake)
-endif(NOT CMAKE_CROSSCOMPILING)
+endif(CMAKE_CROSSCOMPILING)
+
 
 # codebook.c
 add_custom_command(
index 2ef59fdb07b7122bbc42d2c019b955e49438df9c..b83697d3f31b4d3b4454201da919d13fa52d4ec3 100644 (file)
@@ -137,7 +137,8 @@ if(MINGW)
     set(CMAKE_RC_COMPILE_OBJECT
         "<CMAKE_RC_COMPILER> <FLAGS> -O coff <DEFINES> -i <SOURCE> -o <OBJECT>")
     # Even using msys, cmake doesn't know it can use unix style paths...
-    set(CMAKE_LIBRARY_PATH C:/MinGW/lib;C:/MinGW/msys/1.0/lib;C:/MinGW/msys/1.0/local/lib)
+    set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH};C:/MinGW/lib;C:/MinGW/msys/1.0/lib;C:/MinGW/msys/1.0/local/lib)
+       message("Library path: ${CMAKE_LIBRARY_PATH}")
     # Try to build in libgcc and libstdc++ but it doesn't appear to work.
     #add_definitions(-static-libgcc -static-libstdc++)
     # Try to grab all the runtime dlls for the windows installer.