DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit a764e196cf876924a8447c71bc3f3dad83224e7e
parent 0d72be018e837f35729033b06c36f6832b3fb9f4
Author: JP Cimalando <jp-dev@inbox.ru>
Date:   Mon, 24 May 2021 14:52:58 +0200

Merge pull request #277 from jpcima/cmake-updates

cmake: option -mstackrealign on win32 builds
Diffstat:
Mcmake/DPF-plugin.cmake | 9+++++++++
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