diff options
author | Tony Theodore <tonyt@logyst.com> | 2016-08-11 16:10:23 (GMT) |
---|---|---|
committer | Tony Theodore <tonyt@logyst.com> | 2016-08-11 16:19:40 (GMT) |
commit | e66f2a9e9d516f813e140d6b3200036473484bb5 (patch) | |
tree | 2bf9dea29e7acb50b7c743f1fb2cd70a2dcefcdf /src/mxe-conf.mk | |
parent | c7218bfbc45d182e59ba3c3543cde6e591fbe92a (diff) | |
download | mxe-e66f2a9e9d516f813e140d6b3200036473484bb5.zip mxe-e66f2a9e9d516f813e140d6b3200036473484bb5.tar.gz mxe-e66f2a9e9d516f813e140d6b3200036473484bb5.tar.bz2 |
cmake: fix windres invocation
Windres doesn't recognise various gcc flags like `-mms-bitfields`,
`-fopenmp`, `-mthreads` etc. (basically anything not `-D` or `-I`).
CMake will filter options if `add_compile_options()` is used, but not
for `add_definitions()`. The developers class it as a "won't fix" as
they believe `add_definitions()` shouldn't be used for such flags.
Fixes #1475
Diffstat (limited to 'src/mxe-conf.mk')
-rw-r--r-- | src/mxe-conf.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mxe-conf.mk b/src/mxe-conf.mk index 83a92b0..fa36c08 100644 --- a/src/mxe-conf.mk +++ b/src/mxe-conf.mk @@ -20,6 +20,9 @@ define $(PKG)_BUILD # create the CMake toolchain file # individual packages (e.g. hdf5) should add their # own files under CMAKE_TOOLCHAIN_DIR + # CMAKE_RC_COMPILE_OBJECT is defined in: + # <cmake root>/share/cmake-X.Y/Modules/Platform/Windows-windres.cmake + mkdir -p '$(CMAKE_TOOLCHAIN_DIR)' touch '$(CMAKE_TOOLCHAIN_DIR)/.gitkeep' (echo 'set(CMAKE_SYSTEM_NAME Windows)'; \ @@ -39,7 +42,6 @@ define $(PKG)_BUILD echo 'set(CMAKE_INSTALL_PREFIX $(PREFIX)/$(TARGET) CACHE PATH "Installation Prefix")'; \ echo 'set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel")'; \ echo 'set(CMAKE_CROSS_COMPILING ON) # Workaround for http://www.cmake.org/Bug/view.php?id=14075'; \ - echo 'set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -O coff <FLAGS> <DEFINES> -o <OBJECT> <SOURCE>") # Workaround for buggy windres rules'; \ echo ''; \ echo 'file(GLOB mxe_cmake_files'; \ echo ' "$(CMAKE_TOOLCHAIN_DIR)/*.cmake"'; \ |