2ca3a9cc3776135eaeb0725f7ea66cdb42e8c05e
- Author
- outfoxxed <outfoxxed@outfoxxed.me>
- Committer
- outfoxxed <outfoxxed@outfoxxed.me>
- Date
Message
Allow manually specifying hyprland headers
Diff
1diff --git a/CMakeLists.txt b/CMakeLists.txt
2index 64e3c51fb5d7c87c832a8421f5c9e8679e4e523c..1a598cfeeab48145df5c8a4f6327f53f2008e52a 100644
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5@@ -11,7 +11,14 @@ if(CMAKE_EXPORT_COMPILE_COMMANDS)
6 endif()
7
8 find_package(PkgConfig REQUIRED)
9-pkg_check_modules(DEPS REQUIRED hyprland pixman-1 libdrm)
10+pkg_check_modules(DEPS REQUIRED pixman-1 libdrm)
11+
12+if(DEFINED ENV{HYPRLAND_INCLUDE})
13+ set(HYPRLAND_INCLUDE_DIRS $ENV{HYPRLAND_INCLUDE})
14+ message(STATUS "Using provided hyprland include dir " ${HYPRLAND_INCLUDE_DIRS} " instead of pkg-config")
15+else()
16+ pkg_check_modules(HYPRLAND REQUIRED hyprland)
17+endif()
18
19 add_library(hy3 SHARED
20 src/main.cpp
21@@ -19,6 +26,6 @@ add_library(hy3 SHARED
22 src/SelectionHook.cpp
23 )
24
25-target_include_directories(hy3 PRIVATE ${DEPS_INCLUDE_DIRS})
26+target_include_directories(hy3 PRIVATE ${HYPRLAND_INCLUDE_DIRS} ${DEPS_INCLUDE_DIRS})
27
28 install(TARGETS hy3 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})