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 if (NOT TARGET glaze::glaze)
15 find_package(glaze 7...<8 QUIET)
16 endif()
17 if (NOT glaze_FOUND AND NOT TARGET glaze::glaze)
18 set(GLAZE_VERSION v7.2.0)
19 message(STATUS "hyprpm: glaze dependency not found, retrieving ${GLAZE_VERSION} with FetchContent")
20 include(FetchContent)
21 FetchContent_Declare(
22 glaze
23 GIT_REPOSITORY https://github.com/stephenberry/glaze.git
24 GIT_TAG ${GLAZE_VERSION}
25 GIT_SHALLOW TRUE
26 EXCLUDE_FROM_ALL
27 )
28 FetchContent_MakeAvailable(glaze)
29 endif()
30
31 add_executable(hyprpm ${SRCFILES})
32 set_target_properties(hyprpm PROPERTIES CXX_VISIBILITY_PRESET hidden)
33
34 target_link_libraries(hyprpm PUBLIC PkgConfig::hyprpm_deps glaze::glaze)
35
36 # binary
37 install(TARGETS hyprpm)
38
39 # shell completions
40 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hyprpm.bash
41 DESTINATION ${CMAKE_INSTALL_DATADIR}/bash-completion/completions
42 RENAME hyprpm)
43 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hyprpm.fish
44 DESTINATION ${CMAKE_INSTALL_DATADIR}/fish/vendor_completions.d)
45 install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/hyprpm.zsh
46 DESTINATION ${CMAKE_INSTALL_DATADIR}/zsh/site-functions
47 RENAME _hyprpm)