mirror of
https://github.com/hyprwm/hyprwayland-scanner.git
synced 2025-12-20 06:50:03 +01:00
cmake: add OpenBSD support (no librt) (#21)
This commit is contained in:
parent
b3b0f1f40a
commit
f6cf414ca0
1 changed files with 7 additions and 1 deletions
|
|
@ -41,7 +41,13 @@ pkg_check_modules(deps REQUIRED IMPORTED_TARGET pugixml)
|
||||||
|
|
||||||
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
||||||
add_executable(hyprwayland-scanner ${SRCFILES})
|
add_executable(hyprwayland-scanner ${SRCFILES})
|
||||||
target_link_libraries(hyprwayland-scanner PRIVATE rt Threads::Threads
|
find_library(librt rt)
|
||||||
|
if("${librt}" MATCHES "librt-NOTFOUND")
|
||||||
|
unset(LIBRT)
|
||||||
|
else()
|
||||||
|
set(LIBRT rt)
|
||||||
|
endif()
|
||||||
|
target_link_libraries(hyprwayland-scanner PRIVATE ${LIBRT} Threads::Threads
|
||||||
PkgConfig::deps)
|
PkgConfig::deps)
|
||||||
|
|
||||||
configure_package_config_file(
|
configure_package_config_file(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue