diff options
Diffstat (limited to 'tests/CMingw-cross-env.cmake')
-rw-r--r-- | tests/CMingw-cross-env.cmake | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/tests/CMingw-cross-env.cmake b/tests/CMingw-cross-env.cmake index 7063be4..c2883eb 100644 --- a/tests/CMingw-cross-env.cmake +++ b/tests/CMingw-cross-env.cmake @@ -2,19 +2,30 @@ # CMake Toolchain file for cross compiling OpenSCAD tests linux->mingw-win32 # -------------------------------------------------------------------------- # +# This will only work under linux using 'wine'. It has not been tested under +# mingw32 nor MSVC +# # Prerequisites: mingw-cross-env, ImageMagick 6.5.9.3 or newer, wine # # Usage: # -# - follow Brad Pitcher's mingw-cross-env for OpenSCAD setup: -# http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Cross-compiling_for_Windows_on_Linux_or_Mac_OS_X -# - cross-compile openscad.exe, to verify your installation works properly. -# - cd openscad/tests && mkdir build-mingw32 && cd build-mingw32 -# - cmake .. -DCMAKE_TOOLCHAIN_FILE=../CMingw-cross-env.cmake \ -# -DMINGW_CROSS_ENV_DIR=<where mingw-cross-env is installed> -# - make should proceed as normal. -# - now run 'ctest' on your *nix machine. -# The test .exe programs should run under Wine. +# follow the README.md to do a mingw-cross build of openscad.exe +# the setenv-mingw-xbuild.sh script will set MXEDIR +# cd openscad/tests && mkdir build-mingw32 && cd build-mingw32 +# # set env variables: +# OPENSCADPATH=../../libraries # (to find MCAD for some tests) +# cmake .. -DCMAKE_TOOLCHAIN_FILE=../CMingw-cross-env.cmake \ +# -DMINGW_CROSS_ENV_DIR=$MXEDIR +# make # (should proceed as normal.) +# now run 'ctest' on your *nix machine. +# The test .exe programs should run under wine +# imagemagick's "convert" comparer will be your actual linux version. +# The pretty printer won't automatically work after the tests. You have to run +# it manually by typing 'wine test_pretty_print.exe' +# +# to debug finding MCAD with OPENSCADPATH, try something like this: +# +# strace -f ctest -R dumptest.*use 2>&1 | grep servos.scad # # See also: # @@ -31,6 +42,7 @@ # cmake's FindQt4.cmake & Qt4ConfigDependentSettings.cmake files # mingw-cross-env's qmake.conf and *.prl files # mingw-cross-env's pkg-config files in usr/i686-pc-mingw32/lib/pkgconfig +# (may have to add to env var PKG_CONFIG_PATH to find qt .pc files) # http://www.vtk.org/Wiki/CMake:How_To_Find_Libraries # @@ -112,6 +124,10 @@ set(QT_UIC_EXECUTABLE ${MINGW_CROSS_ENV_DIR}/usr/bin/i686-pc-mingw32-uic) function(mingw_cross_env_find_qt) # called from CMakeLists.txt + set(PKGC_DEST ${MINGW_CROSS_ENV_DIR}/usr/i686-pc-mingw32/lib/pkgconfig) + set(QT_PKGC_SRC ${MINGW_CROSS_ENV_DIR}/usr/i686-pc-mingw32/qt/lib/pkgconfig/) + file(COPY ${QT_PKGC_SRC} DESTINATION ${PKGC_DEST} FILES_MATCHING PATTERN "*.pc") + find_package( PkgConfig ) pkg_check_modules( QTCORE QtCore ) pkg_check_modules( QTGUI QtGui ) |