mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #6931 from def-/pr-mingw-stack-protector
Fix build which broke in 3 different ways
This commit is contained in:
commit
b57cd2e210
|
@ -297,6 +297,9 @@ if(NOT MSVC AND NOT HAIKU)
|
|||
if(SECURITY_COMPILER_FLAGS)
|
||||
# Protect the stack pointer.
|
||||
add_cxx_compiler_flag_if_supported(OUR_FLAGS -fstack-protector-strong)
|
||||
if(MINGW)
|
||||
add_linker_flag_if_supported(OUR_FLAGS_LINK -lssp)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Disable exceptions as DDNet does not use them.
|
||||
|
@ -573,6 +576,10 @@ if(EXCEPTION_HANDLING)
|
|||
find_package(ExceptionHandling)
|
||||
endif()
|
||||
|
||||
if(SECURITY_COMPILER_FLAGS)
|
||||
find_package(SSP)
|
||||
endif()
|
||||
|
||||
if(TARGET_OS AND TARGET_OS STREQUAL "mac")
|
||||
find_program(CMAKE_OTOOL otool)
|
||||
find_program(DMGBUILD dmgbuild)
|
||||
|
@ -1755,6 +1762,7 @@ set(COPY_FILES
|
|||
${DISCORDSDK_COPY_FILES}
|
||||
${VULKAN_COPY_FILES}
|
||||
${EXCEPTION_HANDLING_COPY_FILES}
|
||||
${SSP_COPY_FILES}
|
||||
)
|
||||
file(COPY ${COPY_FILES} DESTINATION .)
|
||||
# Don't add integration test files to COPY_FILES since we don't want to add
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
find_program(GLSLANG_VALIDATOR_PROGRAM glslangValidator)
|
||||
find_program(GLSLANG_VALIDATOR_PROGRAM
|
||||
NAMES glslang glslangValidator
|
||||
)
|
||||
find_program(SPIRV_OPTIMIZER_PROGRAM spirv-opt)
|
||||
|
||||
set(GLSLANG_VALIDATOR_PROGRAM_FOUND TRUE)
|
||||
|
|
17
cmake/FindSSP.cmake
Normal file
17
cmake/FindSSP.cmake
Normal file
|
@ -0,0 +1,17 @@
|
|||
if(TARGET_OS STREQUAL "windows")
|
||||
set_extra_dirs_lib(SSP ssp)
|
||||
find_file(SSP_LIBRARY
|
||||
NAMES libssp-0.dll
|
||||
HINTS ${HINTS_SSP_LIBDIR}
|
||||
PATHS ${PATHS_SSP_LIBDIR}
|
||||
${CROSSCOMPILING_NO_CMAKE_SYSTEM_PATH}
|
||||
)
|
||||
|
||||
is_bundled(SSP_BUNDLED "${SSP_LIBRARY}")
|
||||
if(NOT SSP_BUNDLED)
|
||||
message(FATAL_ERROR "could not find ssp paths")
|
||||
endif()
|
||||
set(SSP_COPY_FILES
|
||||
"${EXTRA_SSP_LIBDIR}/libssp-0.dll"
|
||||
)
|
||||
endif()
|
|
@ -1 +1 @@
|
|||
Subproject commit 328fd20b5d94b253d699130390bc23c72fae8dca
|
||||
Subproject commit 59d64dbb36ade02607ad20a7f3a45605ab1de80d
|
Loading…
Reference in a new issue