packaging miscellanea

This commit is contained in:
Kyle Isom 2023-10-10 20:46:30 -07:00
parent 237073970e
commit eaebece93b
3 changed files with 28 additions and 5 deletions

View File

@ -4,6 +4,15 @@ project(kge LANGUAGES CXX VERSION 0.0.1)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FetchContent)
FetchContent_Declare(
klib
GIT_REPOSITORY https://git.wntrmute.dev/kyle/klib
GIT_TAG master
FIND_PACKAGE_ARGS NAMES klib
)
FetchContent_MakeAvailable(klib)
find_package(SDL2 REQUIRED)
find_package(OpenGL REQUIRED)
find_package(klib REQUIRED)
@ -56,10 +65,14 @@ target_include_directories(imgui PUBLIC
include_directories(ext/ ${SDL2_INCLUDE_DIRS} ${KLIB_INCLUDE_DIRS})
configure_file(kge.desktop.in kge.desktop @ONLY)
add_executable(kge
kge.cc
)
target_link_libraries(kge imgui ${KLIB_LIBRARIES})
install(TARGETS kge RUNTIME DESTINATION bin)
install(TARGETS kge RUNTIME DESTINATION bin COMPONENT dist)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kge.desktop
DESTINATION share/applications
COMPONENT dist)
include(CMakePack.txt)

View File

@ -12,11 +12,12 @@ set(CPACK_DEBIAN_PACKAGE_MAINTAINER "K. Isom")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Kyle's Graphical Editor")
set(CPACK_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libc++1 (>= 3.7.0-1)"
"libsdl2-2.0-0"
"libfreetype6 (>= 2.11.1)"
# "libc++12 (>= 3.7.0-1)"
"libsdl2-2.0-0, libfreetype6 (>= 2.11.1)"
)
set(CPACK_DEBIAN_PACKAGE_SECTION devel)
set(CPACK_DEBIAN_PACKAGE_SECTION universe/editors)
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_ALL dist)
if(LINUX)
set(CPACK_GENERATOR "DEB;STGZ;TGZ")

9
kge.desktop.in Normal file
View File

@ -0,0 +1,9 @@
[Desktop Entry]
Type=Application
Version=@PROJECT_VERSION@
Name=@PROJECT_NAME@
Comment=@PROJECT_DESCRIPTION@
Exec=kge
Icon=
Terminal=false
Categories=Editors