diff options
author | Martijn van Beurden <mvanb1@gmail.com> | 2021-12-28 16:50:33 +0100 |
---|---|---|
committer | Martijn van Beurden <mvanb1@gmail.com> | 2022-04-13 17:37:50 +0200 |
commit | 805b7dba834ecf26904a7b21adeee5bab7ad617d (patch) | |
tree | 42f8b8c94de318577b53f9776a884f5c1a357c1a /CMakeLists.txt | |
parent | 617efda90d046377bb911fb4f30e4f5445b7d781 (diff) | |
download | flac-805b7dba834ecf26904a7b21adeee5bab7ad617d.tar.gz |
[CMake] Build with -lssp on MinGW
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c8bc8174..e763008c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,6 +53,7 @@ include(CheckFunctionExists) include(CheckIncludeFile) include(CheckCSourceCompiles) include(CheckCXXSourceCompiles) +include(CheckLibraryExists) include(GNUInstallDirs) include(UseSystemExtensions) include(TestBigEndian) @@ -83,6 +84,8 @@ if(MINGW AND (WITH_FORTIFY_SOURCE OR WITH_STACK_PROTECTOR)) check_library_exists(ssp __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) endif() elseif(NOT MSVC) set(HAVE_LIBSSP 1) |