diff options
author | mm <mm@FreeBSD.org> | 2011-12-21 11:09:24 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-12-21 11:09:24 +0000 |
commit | 33c445c76a378bc01d5a82fe9db3aa1a2773b2aa (patch) | |
tree | f053a72029402b6415c2ceb58bd4a5a0e1d2a288 /contrib/libarchive/tar/CMakeLists.txt | |
parent | 1978c13acfb0ee99028517bffc774c1db12b112d (diff) | |
parent | b9aea3a5a6aa80371d02565d46c38cba6c50fb01 (diff) | |
download | FreeBSD-src-33c445c76a378bc01d5a82fe9db3aa1a2773b2aa.zip FreeBSD-src-33c445c76a378bc01d5a82fe9db3aa1a2773b2aa.tar.gz |
Copy libarchive from vendor branch to contrib
MFC after: 2 weeks
Diffstat (limited to 'contrib/libarchive/tar/CMakeLists.txt')
-rw-r--r-- | contrib/libarchive/tar/CMakeLists.txt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/contrib/libarchive/tar/CMakeLists.txt b/contrib/libarchive/tar/CMakeLists.txt new file mode 100644 index 0000000..2ed8161 --- /dev/null +++ b/contrib/libarchive/tar/CMakeLists.txt @@ -0,0 +1,55 @@ +############################################ +# +# How to build bsdtar +# +############################################ +IF (ENABLE_TAR) + + SET(bsdtar_SOURCES + bsdtar.c + bsdtar.h + bsdtar_platform.h + cmdline.c + getdate.c + read.c + subst.c + tree.c + tree.h + util.c + write.c + ../libarchive_fe/err.c + ../libarchive_fe/err.h + ../libarchive_fe/lafe_platform.h + ../libarchive_fe/line_reader.c + ../libarchive_fe/line_reader.h + ../libarchive_fe/matching.c + ../libarchive_fe/matching.h + ../libarchive_fe/pathmatch.c + ../libarchive_fe/pathmatch.h + ) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../libarchive_fe) + IF(WIN32 AND NOT CYGWIN) + LIST(APPEND bsdtar_SOURCES bsdtar_windows.c) + LIST(APPEND bsdtar_SOURCES bsdtar_windows.h) + ENDIF(WIN32 AND NOT CYGWIN) + + # bsdtar documentation + SET(bsdtar_MANS bsdtar.1) + + # How to build bsdtar + ADD_EXECUTABLE(bsdtar ${bsdtar_SOURCES}) + IF(ENABLE_TAR_SHARED) + TARGET_LINK_LIBRARIES(bsdtar archive ${ADDITIONAL_LIBS}) + ELSE(ENABLE_TAR_SHARED) + TARGET_LINK_LIBRARIES(bsdtar archive_static ${ADDITIONAL_LIBS}) + SET_TARGET_PROPERTIES(bsdtar PROPERTIES COMPILE_DEFINITIONS + LIBARCHIVE_STATIC) + ENDIF(ENABLE_TAR_SHARED) + GET_TARGET_PROPERTY(BSDTAR bsdtar LOCATION) + + # Installation rules + INSTALL(TARGETS bsdtar RUNTIME DESTINATION bin) + INSTALL_MAN(${bsdtar_MANS}) +ENDIF(ENABLE_TAR) + +add_subdirectory(test) |