From: Lasse Collin Date: Thu, 20 Jun 2024 15:12:21 +0000 (+0300) Subject: CMake: Keep existing options in LIBS when adding -lrt X-Git-Tag: v5.6.3~41 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85a55e1120bebac2f3cd9af8965f4a6335eeeb9b;p=thirdparty%2Fxz.git CMake: Keep existing options in LIBS when adding -lrt This makes no difference yet because -lrt is currently the only option that might be added to LIBS. (cherry picked from commit 75ce4797d49621710e6da95d8cb91541028c6d68) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 151ffe9c..785ee8a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,7 +273,7 @@ if(NOT HAVE_CLOCK_GETTIME) # CMAKE_REQUIRED_LIBRARIES for further tests too. if(HAVE_CLOCK_GETTIME_LIBRT) link_libraries(rt) - set(LIBS "-lrt") # For liblzma.pc + set(LIBS "-lrt ${LIBS}") # For liblzma.pc else() list(REMOVE_AT CMAKE_REQUIRED_LIBRARIES 0) endif()