diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2020-09-30 17:28:58 +0200 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2020-10-01 21:23:00 +0200 |
commit | 559f90fed73cf10e429cf96e6c2ed11c4270bb39 (patch) | |
tree | d94f637a9311af72648ca39ab1c5a7010305abcc /expat/CMakeLists.txt | |
parent | 2e63ab0782800e9c9d4ff851d1a903dded083d1d (diff) | |
download | libexpat-git-559f90fed73cf10e429cf96e6c2ed11c4270bb39.tar.gz |
CMake: Support "make package" based on CPack
On Linux, this will create a file "expat-2.2.9-Linux.tar.gz"
with the following content:
$ tar tf expat-2.2.9-Linux.tar.gz | sort | grep -v '/$'
expat-2.2.9-Linux/bin/xmlwf
expat-2.2.9-Linux/include/expat_config.h
expat-2.2.9-Linux/include/expat_external.h
expat-2.2.9-Linux/include/expat.h
expat-2.2.9-Linux/lib64/cmake/expat-2.2.9/expat.cmake
expat-2.2.9-Linux/lib64/cmake/expat-2.2.9/expat-config.cmake
expat-2.2.9-Linux/lib64/cmake/expat-2.2.9/expat-config-version.cmake
expat-2.2.9-Linux/lib64/cmake/expat-2.2.9/expat-noconfig.cmake
expat-2.2.9-Linux/lib64/libexpat.so
expat-2.2.9-Linux/lib64/libexpat.so.1
expat-2.2.9-Linux/lib64/libexpat.so.1.6.11
expat-2.2.9-Linux/lib64/pkgconfig/expat.pc
expat-2.2.9-Linux/share/doc/expat/AUTHORS
expat-2.2.9-Linux/share/doc/expat/changelog
expat-2.2.9-Linux/share/man/man1/xmlwf.1
Diffstat (limited to 'expat/CMakeLists.txt')
-rw-r--r-- | expat/CMakeLists.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt index fc2c68d6..5cda5686 100644 --- a/expat/CMakeLists.txt +++ b/expat/CMakeLists.txt @@ -622,6 +622,25 @@ expat_install( ) # +# CPack +# + +# This effectively disables target "package_source". +# That is done due to CPack's unfortunate choice of an exclusion list +# rather than inclusion list. An exclusion list does not protect against +# unwanted files ending up in the resulting archive in a way that's +# safe to run from an Expat developer's machine. +set(CPACK_SOURCE_GENERATOR '') + +if(WIN32) + set(CPACK_GENERATOR ZIP) +else() + set(CPACK_GENERATOR TGZ) +endif() + +include(CPack) + +# # Summary # if(EXPAT_CHAR_TYPE STREQUAL "char") |