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 75ce4797d4)
This commit is contained in:
Lasse Collin 2024-06-20 18:12:21 +03:00
parent e24a762f1b
commit 85a55e1120
No known key found for this signature in database
GPG Key ID: 38EE757D69184620
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ if(NOT HAVE_CLOCK_GETTIME)
# CMAKE_REQUIRED_LIBRARIES for further tests too. # CMAKE_REQUIRED_LIBRARIES for further tests too.
if(HAVE_CLOCK_GETTIME_LIBRT) if(HAVE_CLOCK_GETTIME_LIBRT)
link_libraries(rt) link_libraries(rt)
set(LIBS "-lrt") # For liblzma.pc set(LIBS "-lrt ${LIBS}") # For liblzma.pc
else() else()
list(REMOVE_AT CMAKE_REQUIRED_LIBRARIES 0) list(REMOVE_AT CMAKE_REQUIRED_LIBRARIES 0)
endif() endif()