mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 13:45:59 +01:00
hyprctl: link to much less libraries (#7212)
This makes hyprctl start significantly faster. $ time for ((i=0; i<1000; i++)); do hyprctl/hyprctl -j activewindow >/dev/null; done Before: 12.269 s (about 12.3 ms/execution) After: 2.142 s (about 2.1 ms/execution)
This commit is contained in:
parent
99e9cb5107
commit
d5bc3eb1fa
2 changed files with 7 additions and 1 deletions
|
@ -87,6 +87,12 @@ else()
|
|||
endif()
|
||||
find_package(OpenGL REQUIRED COMPONENTS ${GLES_VERSION})
|
||||
|
||||
pkg_check_modules(
|
||||
hyprctl_deps
|
||||
REQUIRED
|
||||
IMPORTED_TARGET
|
||||
hyprutils>=0.2.1)
|
||||
|
||||
pkg_check_modules(
|
||||
deps
|
||||
REQUIRED
|
||||
|
|
|
@ -9,7 +9,7 @@ pkg_check_modules(deps REQUIRED IMPORTED_TARGET hyprutils>=0.1.1)
|
|||
|
||||
add_executable(hyprctl "main.cpp")
|
||||
|
||||
target_link_libraries(hyprctl PUBLIC PkgConfig::deps)
|
||||
target_link_libraries(hyprctl PUBLIC PkgConfig::hyprctl_deps)
|
||||
|
||||
# binary
|
||||
install(TARGETS hyprctl)
|
||||
|
|
Loading…
Reference in a new issue