diff options
author | Zaba999 <qrwfw5rp> | 2012-09-29 23:53:57 +0200 |
---|---|---|
committer | Zaba999 <qrwfw5rp> | 2012-09-29 23:53:57 +0200 |
commit | 95e1d101c82e43396fd93abfaa522e3651613c4c (patch) | |
tree | 9d72f27e84a25c7a744b31eb7612698506ac5b68 /cmake | |
parent | aa9df8b1f0fbbad4c7be0214a19a90b8495a2067 (diff) | |
parent | c8f39a4c96ab63f9e3edc96845e1b70c89b95d2b (diff) | |
download | colobot-95e1d101c82e43396fd93abfaa522e3651613c4c.tar.gz colobot-95e1d101c82e43396fd93abfaa522e3651613c4c.tar.bz2 colobot-95e1d101c82e43396fd93abfaa522e3651613c4c.zip |
Merge branch 'dev' of https://github.com/colobot/colobot into dev
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/mxe.cmake | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/cmake/mxe.cmake b/cmake/mxe.cmake new file mode 100644 index 0000000..4507a80 --- /dev/null +++ b/cmake/mxe.cmake @@ -0,0 +1,29 @@ +# When cross-compiling with MXE, we need to straighten some things + +# Checking is a bit primitive, but this should detect MXE toolchain file +if((${CMAKE_CROSSCOMPILING}) AND (DEFINED MSYS)) + message(STATUS "Detected MXE build") + set(MXE 1) + # Because some tests will not compile + set(TESTS OFF) + # All must be static, CBOT and GLEW too + set(CBOT_STATIC ON) + set(GLEW_STATIC ON) + # Because find package scripts are lame + set(SDLTTF_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/include/SDL) + set(SDLIMAGE_INCLUDE_DIR ${CMAKE_FIND_ROOT_PATH}/include/SDL) + set(MXE_LIBS + # For some reason, these have to be absolute paths + ${CMAKE_FIND_ROOT_PATH}/lib/libintl.a + ${CMAKE_FIND_ROOT_PATH}/lib/libiconv.a + ${CMAKE_FIND_ROOT_PATH}/lib/libglew32s.a + ${CMAKE_FIND_ROOT_PATH}/lib/libfreetype.a + ${CMAKE_FIND_ROOT_PATH}/lib/libltdl.a + ${CMAKE_FIND_ROOT_PATH}/lib/libopengl32.a + ${CMAKE_FIND_ROOT_PATH}/lib/libjpeg.a + ${CMAKE_FIND_ROOT_PATH}/lib/libwinmm.a + ${CMAKE_FIND_ROOT_PATH}/lib/libdxguid.a + ) +else() + set(MXE 0) +endif()
\ No newline at end of file |