From 88c3f9a354cad57a3ae01fb83ed9a135a357435b Mon Sep 17 00:00:00 2001 From: "Fletcher T. Penney" Date: Mon, 9 Nov 2015 07:23:13 -0500 Subject: [PATCH] Try to get MinGW-w64 properly configured --- Makefile | 6 +++--- ...ain-mingw64.cmake => Toolchain-MinGW-w64-32bit.cmake} | 2 +- tools/Toolchain-MinGW-w64-64bit.cmake | 9 +++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) rename tools/{Toolchain-mingw64.cmake => Toolchain-MinGW-w64-32bit.cmake} (75%) create mode 100644 tools/Toolchain-MinGW-w64-64bit.cmake diff --git a/Makefile b/Makefile index 52d29b6..8f2d5a3 100644 --- a/Makefile +++ b/Makefile @@ -32,19 +32,19 @@ xcode: $(BUILD_DIR) .PHONY : windows windows: $(BUILD_DIR) cd $(BUILD_DIR); touch README.html; \ - cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release .. + cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-MinGW-w64-64bit.cmake -DCMAKE_BUILD_TYPE=Release .. # Build Windows zip file using MinGW on *nix .PHONY : windows-zip windows-zip: $(BUILD_DIR) cd $(BUILD_DIR); touch README.html; \ - cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-mingw64.cmake -DCMAKE_BUILD_TYPE=Release -DZIP=1 .. + cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-MinGW-w64-64bit.cmake -DCMAKE_BUILD_TYPE=Release -DZIP=1 .. # Cross-compile for Windows using MinGW on *nix (32-bit) .PHONY : windows-32 windows-32: $(BUILD_DIR) cd $(BUILD_DIR); touch README.html; \ - cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-mingw32.cmake -DCMAKE_BUILD_TYPE=Release .. + cmake -DCMAKE_TOOLCHAIN_FILE=../tools/Toolchain-MinGW-w64-32bit.cmake -DCMAKE_BUILD_TYPE=Release .. # Build Windows zip file using MinGW on *nix (32-bit) .PHONY : windows-zip-32 diff --git a/tools/Toolchain-mingw64.cmake b/tools/Toolchain-MinGW-w64-32bit.cmake similarity index 75% rename from tools/Toolchain-mingw64.cmake rename to tools/Toolchain-MinGW-w64-32bit.cmake index dbba2b4..17347e0 100644 --- a/tools/Toolchain-mingw64.cmake +++ b/tools/Toolchain-MinGW-w64-32bit.cmake @@ -1,4 +1,4 @@ -# Settings for compiling for Windows 64-bit machines +# Settings for compiling for Windows 32-bit machines using MinGW-w64 set (CMAKE_SYSTEM_NAME Windows) diff --git a/tools/Toolchain-MinGW-w64-64bit.cmake b/tools/Toolchain-MinGW-w64-64bit.cmake new file mode 100644 index 0000000..9d2b4f8 --- /dev/null +++ b/tools/Toolchain-MinGW-w64-64bit.cmake @@ -0,0 +1,9 @@ +# Settings for compiling for Windows 64-bit machines using MinGW-w64 + +set (CMAKE_SYSTEM_NAME Windows) + +set (CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) +set (CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) +set (CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) + +set (CMAKE_FIND_ROOT_PATH /usr/bin) -- 2.40.0