From: Tim Kientzle Date: Mon, 16 Nov 2009 06:26:09 +0000 (-0500) Subject: On Windows, building a client against a static libarchive X-Git-Tag: v2.8.0~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99510e132890526d71fb065f09c2bd9c3658b179;p=thirdparty%2Flibarchive.git On Windows, building a client against a static libarchive requires LIBARCHIVE_STATIC be defined. SVN-Revision: 1653 --- diff --git a/cpio/CMakeLists.txt b/cpio/CMakeLists.txt index 84934ad0c..3cafb7d7c 100644 --- a/cpio/CMakeLists.txt +++ b/cpio/CMakeLists.txt @@ -35,6 +35,8 @@ IF(ENABLE_CPIO) TARGET_LINK_LIBRARIES(bsdcpio archive ${ADDITIONAL_LIBS}) ELSE(ENABLE_CPIO_SHARED) TARGET_LINK_LIBRARIES(bsdcpio archive_static ${ADDITIONAL_LIBS}) + SET_TARGET_PROPERTIES(bsdcpio PROPERTIES COMPILE_DEFINITIONS + LIBARCHIVE_STATIC) ENDIF(ENABLE_CPIO_SHARED) # On Windows, DLL must end up in same dir with EXEs IF(WIN32 AND NOT CYGWIN) diff --git a/tar/CMakeLists.txt b/tar/CMakeLists.txt index f6a0d0ec7..d70022334 100644 --- a/tar/CMakeLists.txt +++ b/tar/CMakeLists.txt @@ -42,6 +42,8 @@ IF (ENABLE_TAR) 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) # On Windows, DLL must end up in same dir with EXEs IF(WIN32 AND NOT CYGWIN)