Merge pull request #4629: 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
This commit is contained in:
Robert Adam 2020-12-14 08:08:59 +01:00 committed by GitHub
commit 0156972236
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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"
)