kge/cmake/packaging.cmake

62 lines
1.8 KiB
CMake
Raw Normal View History

2023-10-10 00:19:54 +00:00
# Packaging support
include(InstallRequiredSystemLibraries)
2023-10-11 23:27:03 +00:00
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CPACK_DEBIAN_PACKAGE_DEBUG ON)
endif()
2023-10-10 00:19:54 +00:00
set(CPACK_PACKAGE_VENDOR "Shimmering Clarity")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "kyle's editor")
2023-10-10 00:19:54 +00:00
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
2023-10-11 23:27:03 +00:00
###################
### DEBIANESQUE ###
###################
if(${BUILD_GUI})
2023-10-11 23:27:03 +00:00
set(CPACK_COMPONENTS_ALL gui nox)
else()
set(CPACK_COMPONENTS_ALL nox)
endif()
2023-10-11 23:27:03 +00:00
set(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP)
set(CPACK_DEBIAN_ENABLE_COMPONENT_DEPENDS ON)
2023-10-11 03:46:30 +00:00
set(CPACK_DEBIAN_PACKAGE_SECTION universe/editors)
set(CPACK_DEB_COMPONENT_INSTALL ON)
2023-10-11 23:27:03 +00:00
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "K. Isom")
set(CPACK_PACKAGE_nox_DESCRIPTION_SUMMARY "kyle's editor")
set(CPACK_PACKAGE_nox_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
set(CPACK_PACKAGE_nox_PACKAGE_NAME "kge")
set(CPACK_DEBIAN_nox_PACKAGE_NAME "ke")
if(BUILD_GUI)
set(CPACK_PACKAGE_gui_PACKAGE_NAME "kge")
set(CPACK_DEBIAN_gui_PACKAGE_NAME "kge")
set(CPACK_PACKAGE_gui_DESCRIPTION_SUMMARY " graphical front-end for kyle's editor")
set(CPACK_PACKAGE_gui_DESCRIPTION "graphical front-end for ${CPACK_PACKAGE_DESCRIPTION} ")
endif()
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)
2023-10-10 00:19:54 +00:00
if(LINUX)
2023-10-11 02:27:17 +00:00
set(CPACK_GENERATOR "DEB;STGZ;TGZ")
2023-10-10 00:19:54 +00:00
elseif(APPLE)
2023-10-11 05:23:12 +00:00
set(CPACK_GENERATOR "productbuild;TGZ")
2023-10-10 00:19:54 +00:00
elseif(MSVC OR MSYS OR MINGW)
2023-10-11 02:27:17 +00:00
set(CPACK_GENERATOR "NSIS;ZIP")
2023-10-10 00:19:54 +00:00
else()
2023-10-11 02:27:17 +00:00
set(CPACK_GENERATOR "ZIP")
2023-10-10 00:19:54 +00:00
endif()
2023-10-11 23:27:03 +00:00
set(CPACK_SOURCE_GENERATOR "TGZ;ZIP ")
2023-10-10 00:19:54 +00:00
set(CPACK_SOURCE_IGNORE_FILES
2023-10-11 02:27:17 +00:00
/.git
2023-10-11 05:23:12 +00:00
/.idea
2023-10-11 02:27:17 +00:00
/dist
/.*build.*)
2023-10-10 00:19:54 +00:00
2023-10-11 02:27:17 +00:00
include(CPack)
2023-10-11 23:27:03 +00:00
cpack_add_component(gui DEPENDS nox)