summaryrefslogtreecommitdiff
path: root/tcejdb/win64-tc.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tcejdb/win64-tc.cmake')
-rw-r--r--tcejdb/win64-tc.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/tcejdb/win64-tc.cmake b/tcejdb/win64-tc.cmake
new file mode 100644
index 0000000..93abd5d
--- /dev/null
+++ b/tcejdb/win64-tc.cmake
@@ -0,0 +1,22 @@
+if (NOT MXE_HOME)
+ set(MXE_HOME /home/adam/Projects/mxe)
+endif()
+if (NOT MXE_CFG)
+ set(MXE_CFG "x86_64-w64-mingw32.static")
+endif()
+
+set(CMAKE_SYSTEM_NAME Windows)
+set(MSYS 1)
+set(CMAKE_FIND_ROOT_PATH ${MXE_HOME}/usr/${MXE_CFG})
+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 ${MXE_HOME}/usr/bin/${MXE_CFG}-gcc)
+set(CMAKE_CXX_COMPILER ${MXE_HOME}/usr/bin/${MXE_CFG}-g++)
+set(CMAKE_Fortran_COMPILER ${MXE_HOME}/usr/bin/${MXE_CFG}-gfortran)
+set(CMAKE_RC_COMPILER ${MXE_HOME}/usr/bin/${MXE_CFG}-windres)
+set(CMAKE_MODULE_PATH "${MXE_HOME}/src/cmake" ${CMAKE_MODULE_PATH}) # For mxe FindPackage scripts
+#set(CMAKE_INSTALL_PREFIX ${MXE_HOME}/usr/x86_64-w64-mingw32.static CACHE PATH "Installation Prefix")
+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 ${MXE_HOME}/usr/bin/${MXE_CFG}-pkg-config)