From 3bdcbd0548ff1511bee7672c2a34f4c37632d7cf Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Sun, 13 Dec 2020 18:33:00 +0100 Subject: [PATCH] BUILD(cmake): Fix overlay link option being overwritten If a system for instance uses -z,now in their default build flags (as Arch Linux does), it will overwrite the -z,lazy flag which however is needed in order for the overlay to work with games that are not directly linked with OpenGL. By using the BEFORE keyword in cmake, we can prevent this from happening. This commit can be viewed as a follow-up for #3307. Fixes #3296 --- overlay_gl/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/overlay_gl/CMakeLists.txt b/overlay_gl/CMakeLists.txt index 267da184c..53886e33b 100644 --- a/overlay_gl/CMakeLists.txt +++ b/overlay_gl/CMakeLists.txt @@ -19,7 +19,7 @@ set_target_properties(overlay_gl ) if(NOT APPLE) - target_link_options(overlay_gl + target_link_options(overlay_gl BEFORE PRIVATE "-Wl,-z,lazy" )