commit ebec5a3608ae88d18c792a51c23b81b3d5f6391d
parent 0d72be018e837f35729033b06c36f6832b3fb9f4
Author: Jean Pierre Cimalando <jp-dev@inbox.ru>
Date: Mon, 24 May 2021 14:21:31 +0200
cmake: option -mstackrealign on win32 builds
Diffstat:
1 file changed, 9 insertions(+), 0 deletions(-)
diff --git a/cmake/DPF-plugin.cmake b/cmake/DPF-plugin.cmake
@@ -503,6 +503,9 @@ function(dpf__add_executable NAME)
C_VISIBILITY_PRESET "hidden"
CXX_VISIBILITY_PRESET "hidden"
VISIBILITY_INLINES_HIDDEN TRUE)
+ if (MINGW)
+ target_compile_options("${NAME}" PUBLIC "-mstackrealign")
+ endif()
endfunction()
# dpf__add_module
@@ -520,6 +523,9 @@ function(dpf__add_module NAME)
if ((NOT WIN32 AND NOT APPLE) OR MINGW)
target_link_libraries("${NAME}" PRIVATE "-Wl,--no-undefined")
endif()
+ if (MINGW)
+ target_compile_options("${NAME}" PUBLIC "-mstackrealign")
+ endif()
endfunction()
# dpf__add_static_library
@@ -534,6 +540,9 @@ function(dpf__add_static_library NAME)
C_VISIBILITY_PRESET "hidden"
CXX_VISIBILITY_PRESET "hidden"
VISIBILITY_INLINES_HIDDEN TRUE)
+ if (MINGW)
+ target_compile_options("${NAME}" PUBLIC "-mstackrealign")
+ endif()
endfunction()
# dpf__add_plugin_main