mirror of
https://github.com/hyprwm/Hyprland
synced 2025-01-10 17:29:49 +01:00
hyprpm: add glaze dependency FetchContent fallback (#8899)
Use FetchContent to retrieve glaze dependency if not available with find_package. Allows to build hyprpm w/o installing glaze at system level (on some distros is not available in official repositories).
This commit is contained in:
parent
9f933da1c5
commit
1989b0049f
1 changed files with 14 additions and 1 deletions
|
@ -10,7 +10,20 @@ file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
|
||||||
set(CMAKE_CXX_STANDARD 23)
|
set(CMAKE_CXX_STANDARD 23)
|
||||||
|
|
||||||
pkg_check_modules(hyprpm_deps REQUIRED IMPORTED_TARGET tomlplusplus hyprutils>=0.2.4)
|
pkg_check_modules(hyprpm_deps REQUIRED IMPORTED_TARGET tomlplusplus hyprutils>=0.2.4)
|
||||||
find_package(glaze REQUIRED)
|
|
||||||
|
find_package(glaze QUIET)
|
||||||
|
if (NOT glaze_FOUND)
|
||||||
|
set(GLAZE_VERSION v4.2.3)
|
||||||
|
message(STATUS "glaze dependency not found, retrieving ${GLAZE_VERSION} with FetchContent")
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
glaze
|
||||||
|
GIT_REPOSITORY https://github.com/stephenberry/glaze.git
|
||||||
|
GIT_TAG ${GLAZE_VERSION}
|
||||||
|
GIT_SHALLOW TRUE
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(glaze)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(hyprpm ${SRCFILES})
|
add_executable(hyprpm ${SRCFILES})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue