]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Keep existing options in LIBS when adding -lrt
authorLasse Collin <lasse.collin@tukaani.org>
Thu, 20 Jun 2024 15:12:21 +0000 (18:12 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Fri, 6 Sep 2024 16:12:46 +0000 (19:12 +0300)
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

index 151ffe9cd4acc9f1922cbb602234ff64678908ca..785ee8a7189248f004b51304c54a0bed59cf7c86 100644 (file)
@@ -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()