scsl/cmake/packaging.cmake

41 lines
1.2 KiB
CMake
Raw Normal View History

2023-10-10 00:20:18 +00:00
# Packaging support
include(InstallRequiredSystemLibraries)
set(CPACK_PACKAGE_VENDOR "Shimmering Clarity")
2023-10-15 01:38:01 +00:00
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Shimmering Clarity standard C++ library.")
2023-10-10 00:20:18 +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})
set(CPACK_PACKAGE_FILE_NAME
${PROJECT_NAME}-${PROJECT_VERSION}-${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_ARCH}${CMAKE_HOST_SYSTEM_PROCESSOR})
2023-10-10 00:20:18 +00:00
# Debian settings
2023-10-15 01:38:01 +00:00
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Shimmering Clarity")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Shimmering Clarity standard C++ library")
2023-10-10 00:20:18 +00:00
set(CPACK_PACKAGE_DESCRIPTION ${CPACK_PACKAGE_DESCRIPTION})
2023-10-16 01:34:24 +00:00
set(CPACK_PACKAGE_DEPENDS)
2023-10-10 00:20:18 +00:00
set(CPACK_DEBIAN_PACKAGE_SECTION devel)
2023-10-15 01:38:01 +00:00
set(CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS ON)
2023-10-16 01:34:24 +00:00
set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT)
2023-10-10 00:20:18 +00:00
if(LINUX)
set(CPACK_GENERATOR "DEB;STGZ;TGZ")
elseif(APPLE)
2023-10-11 02:09:25 +00:00
set(CPACK_GENERATOR "productbuild")
2023-10-10 00:20:18 +00:00
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)
2023-10-15 01:38:01 +00:00
add_custom_target(package_docs DEPENDS SCSL_docs package package_source)