diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2009-03-24 09:49:10 -0400 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2009-03-24 09:49:10 -0400 |
commit | 4139b09bf366ce5209519f6d980027259c6dc639 (patch) | |
tree | f5dab0c06cb8500afaaef95569647f954427a5b8 /tar/CMakeLists.txt | |
parent | 63eafccd215474d2ff201d3478fa783e0371fccd (diff) | |
download | libarchive-4139b09bf366ce5209519f6d980027259c6dc639.tar.gz |
Make archive_windows.c internal static library.
Now bsdtar and bsdcpio on Windows can be made by
both static build and dynamic build.
SVN-Revision: 840
Diffstat (limited to 'tar/CMakeLists.txt')
-rw-r--r-- | tar/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tar/CMakeLists.txt b/tar/CMakeLists.txt index 5aee9187..25b18aa2 100644 --- a/tar/CMakeLists.txt +++ b/tar/CMakeLists.txt @@ -22,7 +22,6 @@ IF (ENABLE_TAR) IF(WIN32 AND NOT CYGWIN) LIST(APPEND bsdtar_SOURCES bsdtar_windows.c) LIST(APPEND bsdtar_SOURCES bsdtar_windows.h) - LIST(APPEND bsdtar_SOURCES ../libarchive/archive_windows.c) ENDIF(WIN32 AND NOT CYGWIN) SET(bsdtar_MANS bsdtar.1) @@ -31,10 +30,15 @@ IF (ENABLE_TAR) # Register target # ADD_EXECUTABLE(bsdtar ${bsdtar_SOURCES}) + IF(WIN32 AND NOT CYGWIN) + ADD_DEPENDENCIES(bsdtar archive_windows_static) + ENDIF(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}) + SET_TARGET_PROPERTIES(bsdtar PROPERTIES COMPILE_DEFINITIONS + LIBARCHIVE_STATIC) ENDIF(ENABLE_TAR_SHARED) IF(WIN32 AND NOT CYGWIN) SET_TARGET_PROPERTIES(bsdtar PROPERTIES |