reorganize files and fix build.

+ build is split into dist and nox variants.
This commit is contained in:
2023-10-11 15:01:48 -07:00
parent a61916206c
commit 70ceadb880
10 changed files with 18 additions and 9 deletions

41
cmake/packaging.cmake Normal file
View File

@@ -0,0 +1,41 @@
# Packaging support
include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_VENDOR "Shimmering Clarity")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "kyle's 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 editor")
set(CPACK_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
if(${BUILD_GUI})
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"libsdl2-2.0-0, libfreetype6 (>= 2.11.1)"
)
endif()
set(CPACK_DEBIAN_PACKAGE_SECTION universe/editors)
set(CPACK_DEB_COMPONENT_INSTALL ON)
set(CPACK_COMPONENTS_ALL dist nox)
set(CPACK_COMPONENTS_GROUPING ONE_PER_GROUP)
if(LINUX)
set(CPACK_GENERATOR "DEB;STGZ;TGZ")
elseif(APPLE)
set(CPACK_GENERATOR "productbuild;TGZ")
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
/.idea
/dist
/.*build.*)
include(CPack)