>From fc26c94f2026562b765a0f0781d22b3843280f73 Mon Sep 17 00:00:00 2001 From: Nikolaus Waxweiler
Date: Sat, 7 Apr 2018 22:26:53 +0100 Subject: [PATCH 19/19] CMakeLists.txt: Trim CPack definitions, remove package_source target Autotools remains the default mechanism for generating source packages. A source package by CMake will not include ready-made Autotools files anyway. Instead, trim the defintions to produce just binary distributions. The extra component variables would make an installer possible. Cribbed from libssh. --- CMakeLists.txt | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10d2bbca1..63caaac7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -428,29 +428,30 @@ endif () # Packaging -# CPack version numbers for release tarball name. +set(CPACK_PACKAGE_NAME ${CMAKE_PROJECT_NAME}) +set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The FreeType font rendering library.") +set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/docs/LICENSE.TXT") + set(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) set(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) -set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}}) -if (NOT DEFINED CPACK_PACKAGE_DESCRIPTION_SUMMARY) - set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${CMAKE_PROJECT_NAME}") -endif () -if (NOT DEFINED CPACK_SOURCE_PACKAGE_FILE_NAME) - set(CPACK_SOURCE_PACKAGE_FILE_NAME - "${CMAKE_PROJECT_NAME}-${PROJECT_VERSION}-r${PROJECT_REV}" - CACHE INTERNAL "tarball basename" - ) -endif () -set(CPACK_SOURCE_GENERATOR TGZ) -set(CPACK_SOURCE_IGNORE_FILES - "/CVS/;/.svn/;.swp$;.#;/#;/build/;/serial/;/ser/;/parallel/;/par/;~;/preconfig.out;/autom4te.cache/;/.config") -set(CPACK_GENERATOR TGZ) -include(CPack) +set(CPACK_PACKAGE_VERSION_PATCH ${VERSION_PATCH}) +set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") +if (WIN32) + set(CPACK_GENERATOR ZIP) +else() + set(CPACK_GENERATOR TGZ) +endif() -# Add `make dist' target if FREETYPE_DIST is set (which is the default) -if (NOT DEFINED FREETYPE_NO_DIST) - add_custom_target(dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source) -endif () +set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries") +set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers") +set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION + "Library used to build programs which use FreeType") +set(CPACK_COMPONENT_HEADERS_DESCRIPTION + "C/C++ header files for use with FreeType") +set(CPACK_COMPONENT_HEADERS_DEPENDS libraries) +set(CPACK_COMPONENT_LIBRARIES_GROUP "Development") +set(CPACK_COMPONENT_HEADERS_GROUP "Development") -# eof +include(CPack) -- 2.14.3