aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSami Liedes <[email protected]>2024-08-07 16:28:02 +0200
committerGitHub <[email protected]>2024-08-07 16:28:02 +0200
commitd5bc3eb1fa0e11e9e77ffef8c8449a9c022a13a5 (patch)
tree4efc21a6057ef3fab96be25ec280b6ebf7526af0
parent99e9cb510777c62f56c94137b302186d4d9506d8 (diff)
downloadHyprland-d5bc3eb1fa0e11e9e77ffef8c8449a9c022a13a5.tar.gz
Hyprland-d5bc3eb1fa0e11e9e77ffef8c8449a9c022a13a5.zip
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)
-rw-r--r--CMakeLists.txt6
-rw-r--r--hyprctl/CMakeLists.txt2
2 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fa58b63d..fc8eafd5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,6 +88,12 @@ 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
IMPORTED_TARGET
diff --git a/hyprctl/CMakeLists.txt b/hyprctl/CMakeLists.txt
index 64b983e6..aaffe411 100644
--- a/hyprctl/CMakeLists.txt
+++ b/hyprctl/CMakeLists.txt
@@ -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)