| 1 |
This file is part of MXE. See LICENSE.md for licensing information. |
| 2 |
|
| 3 |
Contains ad hoc patches for cross building. |
| 4 |
|
| 5 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 6 |
From: Tony Theodore <[email protected]> |
| 7 |
Date: Fri, 12 Aug 2016 02:01:20 +1000 |
| 8 |
Subject: [PATCH 1/3] fix windres invocation options |
| 9 |
|
| 10 |
windres doesn't recognise various gcc flags like -mms-bitfields, |
| 11 |
-fopenmp, -mthreads etc. (basically not `-D` or `-I`) |
| 12 |
|
| 13 |
diff --git a/Modules/Platform/Windows-windres.cmake b/Modules/Platform/Windows-windres.cmake |
| 14 |
index 1111111..2222222 100644 |
| 15 |
--- a/Modules/Platform/Windows-windres.cmake |
| 16 |
+++ b/Modules/Platform/Windows-windres.cmake |
| 17 |
@@ -1 +1 @@ |
| 18 |
-set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <FLAGS> <SOURCE> <OBJECT>") |
| 19 |
+set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <DEFINES> <INCLUDES> <SOURCE> <OBJECT>") |
| 20 |
|
| 21 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 22 |
From: Tony Theodore <[email protected]> |
| 23 |
Date: Tue, 25 Jul 2017 20:34:56 +1000 |
| 24 |
Subject: [PATCH 2/3] add option to disable -isystem |
| 25 |
|
| 26 |
taken from (not accepted): |
| 27 |
https://gitlab.kitware.com/cmake/cmake/merge_requests/895 |
| 28 |
|
| 29 |
see also: |
| 30 |
https://gitlab.kitware.com/cmake/cmake/issues/16291 |
| 31 |
https://gitlab.kitware.com/cmake/cmake/issues/16919 |
| 32 |
|
| 33 |
diff --git a/Modules/Compiler/GNU.cmake b/Modules/Compiler/GNU.cmake |
| 34 |
index 1111111..2222222 100644 |
| 35 |
--- a/Modules/Compiler/GNU.cmake |
| 36 |
+++ b/Modules/Compiler/GNU.cmake |
| 37 |
@@ -42,7 +42,7 @@ macro(__compiler_gnu lang) |
| 38 |
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") |
| 39 |
set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -E <SOURCE> > <PREPROCESSED_SOURCE>") |
| 40 |
set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE "<CMAKE_${lang}_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -S <SOURCE> -o <ASSEMBLY_SOURCE>") |
| 41 |
- if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462 |
| 42 |
+ if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4 AND (NOT MXE_DISABLE_INCLUDE_SYSTEM_FLAG)) # work around #4462 |
| 43 |
set(CMAKE_INCLUDE_SYSTEM_FLAG_${lang} "-isystem ") |
| 44 |
endif() |
| 45 |
endmacro() |
| 46 |
|
| 47 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 48 |
From: Tony Theodore <[email protected]> |
| 49 |
Date: Tue, 15 Aug 2017 15:25:06 +1000 |
| 50 |
Subject: [PATCH 3/3] add CPACK_NSIS_EXECUTABLE variable |
| 51 |
|
| 52 |
|
| 53 |
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx |
| 54 |
index 1111111..2222222 100644 |
| 55 |
--- a/Source/CPack/cmCPackNSISGenerator.cxx |
| 56 |
+++ b/Source/CPack/cmCPackNSISGenerator.cxx |
| 57 |
@@ -384,7 +384,9 @@ int cmCPackNSISGenerator::InitializeInternal() |
| 58 |
} |
| 59 |
#endif |
| 60 |
|
| 61 |
- nsisPath = cmSystemTools::FindProgram("makensis", path, false); |
| 62 |
+ this->SetOptionIfNotSet("CPACK_NSIS_EXECUTABLE", "makensis"); |
| 63 |
+ nsisPath = cmSystemTools::FindProgram( |
| 64 |
+ this->GetOption("CPACK_NSIS_EXECUTABLE"), path, false); |
| 65 |
|
| 66 |
if (nsisPath.empty()) { |
| 67 |
cmCPackLogger( |