summaryrefslogtreecommitdiff
path: root/new/toolchain-mingw64.cmake
diff options
context:
space:
mode:
authorsaurabhb172020-02-26 16:11:59 +0530
committerGitHub2020-02-26 16:11:59 +0530
commite255d0622297488c1c52755be670733418c994cf (patch)
tree1392c90227aeea231c1d86371131e04c40382918 /new/toolchain-mingw64.cmake
parent0db48f6533517ecebfd9f0693f89deca28408b76 (diff)
parentc38609295ad4b617aef472b9c575aee18710a50f (diff)
downloadKiCad-eSim-e255d0622297488c1c52755be670733418c994cf.tar.gz
KiCad-eSim-e255d0622297488c1c52755be670733418c994cf.tar.bz2
KiCad-eSim-e255d0622297488c1c52755be670733418c994cf.zip
Merge pull request #1 from saurabhb17/develop
Secondary files
Diffstat (limited to 'new/toolchain-mingw64.cmake')
-rw-r--r--new/toolchain-mingw64.cmake35
1 files changed, 35 insertions, 0 deletions
diff --git a/new/toolchain-mingw64.cmake b/new/toolchain-mingw64.cmake
new file mode 100644
index 0000000..bf4a366
--- /dev/null
+++ b/new/toolchain-mingw64.cmake
@@ -0,0 +1,35 @@
+
+# This is a CMake toolchain file so we can run Mingw64 to build a Windows64 binaries.
+# http://vtk.org/Wiki/CMake_Cross_Compiling
+
+# usage
+# cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain-mingw64.cmake ../
+
+
+set( CMAKE_SYSTEM_NAME Windows )
+set( CMAKE_SYSTEM_PROCESSOR x86_64 )
+
+#-----<configuration>-----------------------------------------------
+
+# configure only the lines within this <configure> block, typically
+
+set( TC_PATH /usr/bin )
+set( CROSS_COMPILE x86_64-w64-mingw32- )
+
+# specify the cross compiler
+set( CMAKE_C_COMPILER ${TC_PATH}/${CROSS_COMPILE}gcc )
+set( CMAKE_CXX_COMPILER ${TC_PATH}/${CROSS_COMPILE}g++ )
+set( CMAKE_RC_COMPILER ${TC_PATH}/${CROSS_COMPILE}windres )
+
+# where is the target environment
+set( CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 )
+
+#-----</configuration>-----------------------------------------------
+
+# search for programs in the build host directories
+set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
+
+# for libraries and headers in the target directories
+set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
+set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )
+