summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMartijn van Beurden <mvanb1@gmail.com>2022-01-05 14:45:51 +0100
committerMartijn van Beurden <mvanb1@gmail.com>2022-04-13 17:37:50 +0200
commit4256c12eacaefe77ce4236714f8b9259dec2dac0 (patch)
treecd50cf9e41e8bb2fbe88b1ebefe15ab08f909516 /CMakeLists.txt
parent6e3089b9bc6e154b9330120dbc0e4d5968986984 (diff)
downloadflac-4256c12eacaefe77ce4236714f8b9259dec2dac0.tar.gz
[CMake] Specifically prefer linking with static libssp
As to have a libFLAC.dll with no additional dependencies, linking with libssp.a is preferred over linking with libssp.dll.a
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c97eb1c..6322c33b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -82,11 +82,11 @@ check_c_compiler_flag(-mstackrealign HAVE_STACKREALIGN_FLAG)
check_cxx_compiler_flag(-Weffc++ HAVE_WEFFCXX_FLAG)
if(MINGW AND (WITH_FORTIFY_SOURCE OR WITH_STACK_PROTECTOR))
- check_library_exists(ssp __stack_chk_fail "" HAVE_LIBSSP)
+ check_library_exists("ssp.a" __stack_chk_fail "" HAVE_LIBSSP)
if(NOT HAVE_LIBSSP)
message(WARNING "Could not find libssp in MinGW, stack protection and/or FORTIFY_SOURCE are unavailable")
else()
- link_libraries(ssp)
+ link_libraries("ssp.a")
endif()
elseif(NOT MSVC)
set(HAVE_LIBSSP 1)