Files
allhaileris afb81b8278
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Close stale issues and PRs / stale (push) Has been cancelled
init
2026-02-16 15:50:16 +03:00

40 lines
1009 B
CMake

#.rst:
# FindLibRT
# ---------
#
# Find librt library and headers.
#
# The mdoule defines the following variables:
#
# ::
#
# LibRT_FOUND - true if librt was found
# LibRT_INCLUDE_DIR - include search path
# LibRT_LIBRARIES - libraries to link
if(UNIX)
find_path(LibRT_INCLUDE_DIR
NAMES
time.h)
find_library(LibRT_LIBRARIES rt)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibRT
REQUIRED_VARS
LibRT_LIBRARIES
LibRT_INCLUDE_DIR)
if(LibRT_FOUND)
if(NOT TARGET RT::rt)
add_library(RT::rt UNKNOWN IMPORTED)
set_target_properties(RT::rt
PROPERTIES
IMPORTED_LOCATION ${LibRT_LIBRARIES}
INTERFACE_INCLUDE_DIRECTORIES ${LibRT_INCLUDE_DIR})
endif()
endif()
mark_as_advanced(LibRT_LIBRARIES LibRT_INCLUDE_DIR)
endif()