Debian Codegraph @

hyprpm/CMakeLists.txt

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 cmake_minimum_required(VERSION 3.19)
2
3 project(
4 hyprpm
5 DESCRIPTION "A Hyprland Plugin Manager"
6 )
7
8 file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp")
9
10 set(CMAKE_CXX_STANDARD 23)
11
12 pkg_check_modules(hyprpm_deps REQUIRED IMPORTED_TARGET tomlplusplus hyprutils>=0.7.0)
13
14 find_package(glaze 7...<8 QUIET)
15 if (NOT glaze_FOUND)
16 set(GLAZE_VERSION v7.2.0)
17 message(STATUS "hyprpm: glaze dependency not found, retrieving ${GLAZE_VERSION} with FetchContent")
18 include(FetchContent)
19 FetchContent_Declare(
20 glaze
21 GIT_REPOSITORY https://github.com/stephenberry/glaze.git
22 GIT_TAG ${GLAZE_VERSION}
23 GIT_SHALLOW TRUE
24 EXCLUDE_FROM_ALL
25 )
26 FetchContent_MakeAvailable(glaze)
27 endif()
28
29 add_executable(hyprpm ${SRCFILES})
30
31 target_link_libraries(hyprpm PUBLIC PkgConfig::hyprpm_deps glaze::glaze)
32
33 # binary
34 install(TARGETS hyprpm)
35
36 # shell completions
37 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hyprpm.bash
38 DESTINATION ${CMAKE_INSTALL_DATADIR}/bash-completion/completions
39 RENAME hyprpm)
40 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hyprpm.fish
41 DESTINATION ${CMAKE_INSTALL_DATADIR}/fish/vendor_completions.d)
42 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hyprpm.zsh
43 DESTINATION ${CMAKE_INSTALL_DATADIR}/zsh/site-functions
44 RENAME _hyprpm)