Talk:Building FlightGear - Cross Compiling: Difference between revisions

Jump to navigation Jump to search
Line 60: Line 60:
== Superbuild ==
== Superbuild ==
This isn't relevant at the moment, but referring to the Superbuild related comments above: it seems we could end up with a viable workaround by figuring out if/how and where those *.mk files are getting the value for <nowiki>-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)'</nowiki> from - i.e. '''CMAKE_TOOLCHAIN_FILE''' specifically, and directly reuse that in the Superbuild (need to check if that'd work). But if it's too much of a hassle, let's just focus on *.mk files for starters. --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 17:06, 28 May 2015 (EDT)
This isn't relevant at the moment, but referring to the Superbuild related comments above: it seems we could end up with a viable workaround by figuring out if/how and where those *.mk files are getting the value for <nowiki>-DCMAKE_TOOLCHAIN_FILE='$(CMAKE_TOOLCHAIN_FILE)'</nowiki> from - i.e. '''CMAKE_TOOLCHAIN_FILE''' specifically, and directly reuse that in the Superbuild (need to check if that'd work). But if it's too much of a hassle, let's just focus on *.mk files for starters. --[[User:Hooray|Hooray]] ([[User talk:Hooray|talk]]) 17:06, 28 May 2015 (EDT)
: sure, it's stored in mxe/usr/${triplet-name}/share/cmake/mxe-conf.cmake, i'm sorry if this is not the place to include here, but here is it's contents anyway, autotools has similar implementation with $(MXE_CONFIGURE_OPTS), for autotools that is contained in the Makefile IIRC. mxe-conf.cmake: -- [[User:Hamzaalloush|Hamzaalloush]] ([[User talk:Hamzaalloush|talk]]) 17:14, 28 May 2015 (EDT)
<syntaxhighlight lang="make">
set(CMAKE_SYSTEM_NAME Windows)
set(MSYS 1)
set(BUILD_SHARED_LIBS ON)
set(LIBTYPE SHARED)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_FIND_ROOT_PATH /home/hamza/build/hamza-mxe/usr/i686-w64-mingw32.shared)
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_C_COMPILER /home/hamza/build/hamza-mxe/usr/bin/i686-w64-mingw32.shared-gcc)
set(CMAKE_CXX_COMPILER /home/hamza/build/hamza-mxe/usr/bin/i686-w64-mingw32.shared-g++)
set(CMAKE_Fortran_COMPILER /home/hamza/build/hamza-mxe/usr/bin/i686-w64-mingw32.shared-gfortran)
set(CMAKE_RC_COMPILER /home/hamza/build/hamza-mxe/usr/bin/i686-w64-mingw32.shared-windres)
set(CMAKE_MODULE_PATH "/home/hamza/build/hamza-mxe/src/cmake" ${CMAKE_MODULE_PATH}) # For mxe FindPackage scripts
set(CMAKE_INSTALL_PREFIX /home/hamza/build/hamza-mxe/usr/i686-w64-mingw32.shared CACHE PATH "Installation Prefix")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")
set(CMAKE_CROSS_COMPILING ON) # Workaround for http://www.cmake.org/Bug/view.php?id=14075
set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>") # Workaround for buggy windres rules
set(PKG_CONFIG_EXECUTABLE /home/hamza/build/hamza-mxe/usr/bin/i686-w64-mingw32.shared-pkg-config)
set(HDF5_C_COMPILER_EXECUTABLE /home/hamza/build/hamza-mxe/usr/bin/i686-w64-mingw32.shared-h5cc)
set(HDF5_CXX_COMPILER_EXECUTABLE /home/hamza/build/hamza-mxe/usr/bin/i686-w64-mingw32.shared-h5c++)
set(Boost_THREADAPI "win32")
set(QT_QMAKE_EXECUTABLE /home/hamza/build/hamza-mxe/usr/i686-w64-mingw32.shared/qt/bin/qmake)
</syntaxhightlight>


== .deb packaging ==
== .deb packaging ==
272

edits

Navigation menu