From 85a55e1120bebac2f3cd9af8965f4a6335eeeb9b Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Thu, 20 Jun 2024 18:12:21 +0300 Subject: [PATCH] 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) --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()