Update wxWidgets bootstrap to 3.0.2 and other tweaks.
authorhobbes1069 <hobbes1069@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 5 Mar 2015 20:57:14 +0000 (20:57 +0000)
committerhobbes1069 <hobbes1069@01035d8c-6547-0410-b346-abe4f91aad63>
Thu, 5 Mar 2015 20:57:14 +0000 (20:57 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@2054 01035d8c-6547-0410-b346-abe4f91aad63

fdmdv2/cmake/BuildWxWidgets.cmake

index c921eae7f1715e5161832f52ec525862feb144b2..cf0f17b3f16d6c9ed439540a772fba8b922d92c3 100644 (file)
@@ -1,22 +1,33 @@
-set(WXWIDGETS_TARBALL "wxWidgets-3.0.0")
+set(WXWIDGETS_TARBALL "wxWidgets-3.0.2")
+
+# If we're crosscompiling then we need to set the target hose correctly.
+if(MINGW AND CMAKE_CROSSCOMPILING)
+    if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
+        set(HOST x86_64-w64-mingw32)
+    else()
+        set(HOST i686-w64-mingw32)
+    endif()
+endif()
+
+if(MINGW AND NOT CMAKE_CROSSCOMPILING)
+    set(CONFIGURE_COMMAND mingw32-make -C build/msw -f makefile.gcc SHARED=0 UNICODE=1 BUILD=release PREFIX=${CMAKE_BINARY_DIR}/external/dist)
+else()
+    set(CONFIGURE_COMMAND ./configure --host=${HOST} --target=${HOST} --disable-shared --prefix=${CMAKE_BINARY_DIR}/external/dist)
+endif()
 
 include(ExternalProject)
 ExternalProject_Add(wxWidgets
     URL http://downloads.sourceforge.net/wxwindows/${WXWIDGETS_TARBALL}.tar.bz2
     BUILD_IN_SOURCE 1
     INSTALL_DIR external/dist
-    if(MINGW)
-        CONFIGURE_COMMAND mingw32-make -f ${source_dir}/build/msw/makefile.gcc SHARED=0 UNICODE=1 BUILD=release PREFIX=${CMAKE_BINARY_DIR}/external/dist
-    else(MINGW)
-        CONFIGURE_COMMAND ./configure --disable-shared --prefix=${CMAKE_BINARY_DIR}/external/dist
-    endif(MINGW)
+    CONFIGURE_COMMAND ${CONFIGURE_COMMAND}
     BUILD_COMMAND $(MAKE)
     INSTALL_COMMAND $(MAKE) install
 )
 
 ExternalProject_Get_Property(wxWidgets install_dir)
+message(STATUS "wxWidgets install dir: ${install_dir}")
 set(WXCONFIG "${install_dir}/bin/wx-config")
-set(WXRC "${install_dir}/bin/wxrc")
 if(EXISTS ${WXCONFIG})
     set(BS_WX_DONE TRUE)
 endif()