Browse Source

Merge pull request #277 from jpcima/cmake-updates

cmake: option -mstackrealign on win32 builds
pull/280/head
JP Cimalando GitHub 4 years ago
parent
commit
a764e196cf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      cmake/DPF-plugin.cmake

+ 9
- 0
cmake/DPF-plugin.cmake View File

@@ -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


Loading…
Cancel
Save