packaging work

This commit is contained in:
2023-10-10 22:23:12 -07:00
parent eaebece93b
commit 0d0d63ede4
9 changed files with 55 additions and 248 deletions

View File

@@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.22)
project(kge LANGUAGES CXX VERSION 0.0.1)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
string(TIMESTAMP TODAY "%Y%m%d")
include(FetchContent)
FetchContent_Declare(
@@ -70,9 +71,30 @@ add_executable(kge
kge.cc
)
target_link_libraries(kge imgui ${KLIB_LIBRARIES})
install(TARGETS kge RUNTIME DESTINATION bin COMPONENT dist)
add_custom_target(manpages)
configure_file(kge.md kge.1.scdoc @ONLY)
add_custom_command(TARGET manpages COMMAND scdoc < kge.1.scdoc > kge.1
OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/kge.1)
add_dependencies(kge manpages)
install(TARGETS kge
DESTINATION bin
COMPONENT dist)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kge.desktop
DESTINATION share/applications
COMPONENT dist)
install(FILES kge.png
DESTINATION share/${PROJECT_NAME}
COMPONENT dist)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kge.1
DESTINATION share/man/man1
COMPONENT dist)
include(CMakePack.txt)
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()