Add install targets and manpage files for CMake

This commit is contained in:
topazus 2023-11-22 14:13:15 +08:00
parent b6130e3901
commit 05e6f2b7ea

View file

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.4)
project(hyprpicker
project(hyprpicker
DESCRIPTION "A blazing fast wayland wallpaper utility"
)
@ -75,4 +75,13 @@ IF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -no-pie -fno-builtin")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg -no-pie -fno-builtin")
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg -no-pie -fno-builtin")
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
include(GNUInstallDirs)
install(TARGETS hyprpicker
DESTINATION ${CMAKE_INSTALL_BINDIR}
)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/doc/hyprpicker.1
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
)