diff options
author | Martijn van Beurden <mvanb1@gmail.com> | 2022-01-05 14:45:51 +0100 |
---|---|---|
committer | Martijn van Beurden <mvanb1@gmail.com> | 2022-04-13 17:37:50 +0200 |
commit | 4256c12eacaefe77ce4236714f8b9259dec2dac0 (patch) | |
tree | cd50cf9e41e8bb2fbe88b1ebefe15ab08f909516 /CMakeLists.txt | |
parent | 6e3089b9bc6e154b9330120dbc0e4d5968986984 (diff) | |
download | flac-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.txt | 4 |
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) |