diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2009-03-20 22:33:49 -0400 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2009-03-20 22:33:49 -0400 |
commit | 7a118a7313832ec9c16abb0522d57163083458f3 (patch) | |
tree | 4f8a78db528eeed32af2b06fc46b88cd2d300217 /tar/CMakeLists.txt | |
parent | 298a6d481e4aba3eae00fc27e7f5a58f4410c52e (diff) | |
download | libarchive-7a118a7313832ec9c16abb0522d57163083458f3.tar.gz |
Add support both static and dynamic build of bsdtar and bsdcpio
to the cmake build process except Windows.
SVN-Revision: 826
Diffstat (limited to 'tar/CMakeLists.txt')
-rw-r--r-- | tar/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tar/CMakeLists.txt b/tar/CMakeLists.txt index dc60b390..2d60f79a 100644 --- a/tar/CMakeLists.txt +++ b/tar/CMakeLists.txt @@ -30,15 +30,19 @@ IF (ENABLE_TAR) # Register target # ADD_EXECUTABLE(bsdtar ${bsdtar_SOURCES}) - IF(WIN32 AND NOT CYGWIN) + IF(ENABLE_TAR_SHARED) TARGET_LINK_LIBRARIES(bsdtar archive ${ADDITIONAL_LIBS}) + ELSE(ENABLE_TAR_SHARED) + TARGET_LINK_LIBRARIES(bsdtar archive_static ${ADDITIONAL_LIBS}) + ENDIF(ENABLE_TAR_SHARED) + IF(WIN32 AND NOT CYGWIN) SET_TARGET_PROPERTIES(bsdtar PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) SET(BSDTAR ${CMAKE_BINARY_DIR}/debug/bsdtar.exe) ELSE(WIN32 AND NOT CYGWIN) - TARGET_LINK_LIBRARIES(bsdtar archive_static ${ADDITIONAL_LIBS}) SET(BSDTAR ${CMAKE_CURRENT_BINARY_DIR}/bsdtar) ENDIF(WIN32 AND NOT CYGWIN) + # INSTALL(TARGETS bsdtar RUNTIME DESTINATION bin) INSTALL_MAN(${bsdtar_MANS}) ENDIF(ENABLE_TAR) |