From 6bc3600596a73066823558da58935650f5480346 Mon Sep 17 00:00:00 2001 From: SR_team Date: Wed, 22 Jun 2022 04:19:26 +0300 Subject: [PATCH] Fix linking with GLFW for MinGW/MSYS --- src/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5b16901..7b58739 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -155,6 +155,12 @@ if(LIBRW_PLATFORM_GL3) PUBLIC glfw ) + if (MINGW OR MSYS) + target_link_options(librw + PRIVATE + "-fstack-protector" + ) + endif() elseif (LIBRW_GL3_GFXLIB STREQUAL "SDL2") find_package(SDL2 REQUIRED) target_compile_definitions(librw PUBLIC LIBRW_SDL2)