diff options
author | Brad King <brad.king@kitware.com> | 2020-02-13 14:30:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-02-13 17:57:52 (GMT) |
commit | 5d8b3aec0cb8652ae867ff08d2e7bfa2060138dd (patch) | |
tree | 3d39cf776650ac89bedec4fc1d251ff70e6fc8d7 /Utilities/cmlibarchive/libarchive/CMakeLists.txt | |
parent | 9a27ecd4162aebfb595b7a02b958b7dfb95256d8 (diff) | |
parent | 8cce62295a5ddca3e0d1fd7cff0229054972dfe3 (diff) | |
download | CMake-5d8b3aec0cb8652ae867ff08d2e7bfa2060138dd.zip CMake-5d8b3aec0cb8652ae867ff08d2e7bfa2060138dd.tar.gz CMake-5d8b3aec0cb8652ae867ff08d2e7bfa2060138dd.tar.bz2 |
Merge branch 'upstream-LibArchive' into update-libarchive
* upstream-LibArchive:
LibArchive 2020-02-11 (3288ebb0)
Also manually restore content from upstream libarchive's main
`CMakeLists.txt` file that was removed by previous commits and
exclude it with `IF(0)` blocks. Do this as an evil merge so
that `git blame -C` can follow the content to upstream.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/CMakeLists.txt')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/CMakeLists.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/CMakeLists.txt b/Utilities/cmlibarchive/libarchive/CMakeLists.txt index e38d664..891a140 100644 --- a/Utilities/cmlibarchive/libarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/libarchive/CMakeLists.txt @@ -51,6 +51,8 @@ SET(libarchive_SOURCES archive_platform_acl.h archive_platform_xattr.h archive_ppmd_private.h + archive_ppmd8.c + archive_ppmd8_private.h archive_ppmd7.c archive_ppmd7_private.h archive_private.h @@ -100,6 +102,7 @@ SET(libarchive_SOURCES archive_read_support_format_lha.c archive_read_support_format_mtree.c archive_read_support_format_rar.c + archive_read_support_format_rar5.c archive_read_support_format_raw.c archive_read_support_format_tar.c archive_read_support_format_warc.c @@ -147,6 +150,7 @@ SET(libarchive_SOURCES archive_write_set_format_iso9660.c archive_write_set_format_mtree.c archive_write_set_format_pax.c + archive_write_set_format_private.h archive_write_set_format_raw.c archive_write_set_format_shar.c archive_write_set_format_ustar.c @@ -167,6 +171,7 @@ SET(libarchive_MANS archive_entry.3 archive_entry_acl.3 archive_entry_linkify.3 + archive_entry_misc.3 archive_entry_paths.3 archive_entry_perms.3 archive_entry_stat.3 @@ -215,6 +220,11 @@ IF(WIN32 AND NOT CYGWIN) LIST(APPEND libarchive_SOURCES filter_fork_windows.c) ENDIF(WIN32 AND NOT CYGWIN) +IF(ARCHIVE_BLAKE2) + LIST(APPEND libarchive_SOURCES archive_blake2sp_ref.c) + LIST(APPEND libarchive_SOURCES archive_blake2s_ref.c) +ENDIF(ARCHIVE_BLAKE2) + IF(ARCHIVE_ACL_DARWIN) LIST(APPEND libarchive_SOURCES archive_disk_acl_darwin.c) ELSEIF(ARCHIVE_ACL_FREEBSD) @@ -228,3 +238,33 @@ ENDIF() # CMake needs just one static "cmlibarchive" library. ADD_LIBRARY(cmlibarchive STATIC ${libarchive_SOURCES} ${include_HEADERS}) TARGET_LINK_LIBRARIES(cmlibarchive ${ADDITIONAL_LIBS}) + +IF(0) # CMake does not build libarchive's full package. +# Libarchive is a shared library +ADD_LIBRARY(archive SHARED ${libarchive_SOURCES} ${include_HEADERS}) +TARGET_INCLUDE_DIRECTORIES(archive PUBLIC .) +TARGET_LINK_LIBRARIES(archive ${ADDITIONAL_LIBS}) +SET_TARGET_PROPERTIES(archive PROPERTIES SOVERSION ${SOVERSION}) + +# archive_static is a static library +ADD_LIBRARY(archive_static STATIC ${libarchive_SOURCES} ${include_HEADERS}) +TARGET_LINK_LIBRARIES(archive_static ${ADDITIONAL_LIBS}) +SET_TARGET_PROPERTIES(archive_static PROPERTIES COMPILE_DEFINITIONS + LIBARCHIVE_STATIC) +# On Posix systems, libarchive.so and libarchive.a can co-exist. +IF(NOT WIN32 OR CYGWIN) + SET_TARGET_PROPERTIES(archive_static PROPERTIES OUTPUT_NAME archive) +ENDIF(NOT WIN32 OR CYGWIN) + +IF(ENABLE_INSTALL) + # How to install the libraries + INSTALL(TARGETS archive archive_static + RUNTIME DESTINATION bin + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) + INSTALL_MAN(${libarchive_MANS}) + INSTALL(FILES ${include_HEADERS} DESTINATION include) +ENDIF() + +add_subdirectory(test) +ENDIF() |