add packaging setup
This commit is contained in:
parent
b05cf56b1a
commit
3c99ef0f90
|
@ -1,11 +1,12 @@
|
|||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
project(kge LANGUAGES CXX)
|
||||
project(kge LANGUAGES CXX VERSION 0.0.1)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(klib REQUIRED)
|
||||
find_package(Freetype)
|
||||
if (DEFINED FREETYPE_INCLUDE_DIRS)
|
||||
add_definitions(-DIMGUI_ENABLE_FREETYPE)
|
||||
|
@ -54,15 +55,12 @@ target_include_directories(imgui PUBLIC
|
|||
ext/imgui/misc/freetype
|
||||
$<IF:$<TARGET_EXISTS:Freetype::Freetype>,${FREETYPE_INCLUDE_DIRS},>)
|
||||
|
||||
include_directories(ext/ ${SDL2_INCLUDE_DIRS})
|
||||
|
||||
add_executable(BufferTest BufferTest.cc Buffer.cc)
|
||||
add_test(BufferTest COMMAND BufferTest)
|
||||
include_directories(ext/ ${SDL2_INCLUDE_DIRS} ${KLIB_INCLUDE_DIRS})
|
||||
|
||||
add_executable(kge
|
||||
kge.cc
|
||||
Buffer.cc
|
||||
Buffer.h
|
||||
)
|
||||
target_link_libraries(kge imgui)
|
||||
target_link_libraries(kge imgui ${KLIB_LIBRARIES})
|
||||
install(TARGETS kge RUNTIME DESTINATION bin)
|
||||
|
||||
include(CMakePack.txt)
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
# Packaging support
|
||||
include(InstallRequiredSystemLibraries)
|
||||
|
||||
set(CPACK_PACKAGE_VENDOR "Shimmering Clarity")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Kyle's Graphical Editor")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||
|
||||
|
||||
# Debian settings
|
||||
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)"
|
||||
)
|
||||
|
||||
set(CPACK_DEBIAN_PACKAGE_SECTION devel)
|
||||
|
||||
if(LINUX)
|
||||
set(CPACK_GENERATOR "DEB;STGZ;TGZ")
|
||||
elseif(APPLE)
|
||||
set(CPACK_GENERATOR "PACKAGEMAKER")
|
||||
elseif(MSVC OR MSYS OR MINGW)
|
||||
set(CPACK_GENERATOR "NSIS;ZIP")
|
||||
else()
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
endif()
|
||||
|
||||
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP")
|
||||
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
/.git
|
||||
/dist
|
||||
/.*build.*)
|
||||
|
||||
include (CPack)
|
Loading…
Reference in New Issue