From 75ce4797d49621710e6da95d8cb91541028c6d68 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. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8eb6e60f..2184ae90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,7 +287,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()