From c3f4397969e0d645c8aed6e9544eba8887f51ec1 Mon Sep 17 00:00:00 2001 From: hobbes1069 Date: Thu, 5 Mar 2015 20:57:14 +0000 Subject: [PATCH] Update wxWidgets bootstrap to 3.0.2 and other tweaks. git-svn-id: https://svn.code.sf.net/p/freetel/code@2054 01035d8c-6547-0410-b346-abe4f91aad63 --- fdmdv2/cmake/BuildWxWidgets.cmake | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/fdmdv2/cmake/BuildWxWidgets.cmake b/fdmdv2/cmake/BuildWxWidgets.cmake index c921eae7..cf0f17b3 100644 --- a/fdmdv2/cmake/BuildWxWidgets.cmake +++ b/fdmdv2/cmake/BuildWxWidgets.cmake @@ -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() -- 2.25.1