From a82e4324f6ba9430f13a07f9819cd58e75ca9932 Mon Sep 17 00:00:00 2001 From: patrick96 Date: Thu, 3 Mar 2022 15:18:27 +0100 Subject: [PATCH] fix(build): Do not replace CMAKE_EXE_LINKER_FLAGS CMAKE_EXE_LINKER_FLAGS contains, among other things, the LDFLAGS which many distros use to universally apply linker flags. When completely replacing CMAKE_EXE_LINKER_FLAGS, these flags are lost. --- CHANGELOG.md | 3 ++- cmake/cxx.cmake | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52a614ae..1cfb3324 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Build - Fixed compiler warning in Clang 13 ([`#2613`](https://github.com/polybar/polybar/pull/2613)) - Fixed compiler error in GCC 12 ([`#2616`](https://github.com/polybar/polybar/pull/2616), [`#2614`](https://github.com/polybar/polybar/issues/2614)) -- Fixed installation of docs when some are not generated (man, html...) ([`#2612`](https://github.com/polybar/polybar/pull/2612) +- Fixed installation of docs when some are not generated (man, html...) ([`#2612`](https://github.com/polybar/polybar/pull/2612)) +- Fix `LDFLAGS` not being respected ([`#2619`](https://github.com/polybar/polybar/pull/2619)) ## [3.6.0] - 2022-03-01 ### Breaking diff --git a/cmake/cxx.cmake b/cmake/cxx.cmake index fa6776af..ecc0194f 100644 --- a/cmake/cxx.cmake +++ b/cmake/cxx.cmake @@ -108,4 +108,4 @@ string(REPLACE ";" " " cxx_flags_str "${cxx_flags}") string(REPLACE ";" " " cxx_linker_flags_str "${cxx_linker_flags}") # TODO use target_link_options once min cmake version is >= 3.13 -set(CMAKE_EXE_LINKER_FLAGS "${cxx_linker_flags_str}") +set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${cxx_linker_flags_str}")