diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-11-09 19:42:23 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-11-09 19:42:23 (GMT) |
commit | 0106b490dea8c5df7ea529da8851e0059aef6c92 (patch) | |
tree | 589e77b805cd2d225d2a64859ccc327ff1454095 /Utilities/cmlibarchive/CMakeLists.txt | |
parent | b4ed21c305525a2d06a7a338cd84ac13d6145986 (diff) | |
download | CMake-0106b490dea8c5df7ea529da8851e0059aef6c92.zip CMake-0106b490dea8c5df7ea529da8851e0059aef6c92.tar.gz CMake-0106b490dea8c5df7ea529da8851e0059aef6c92.tar.bz2 |
keep libarchive from using a system zlib unless cmake uses one
Diffstat (limited to 'Utilities/cmlibarchive/CMakeLists.txt')
-rw-r--r-- | Utilities/cmlibarchive/CMakeLists.txt | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt index 6fd0086..ca06916 100644 --- a/Utilities/cmlibarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/CMakeLists.txt @@ -143,7 +143,11 @@ IF(ZLIB_FOUND) SET(HAVE_LIBZ 1) SET(HAVE_ZLIB_H 1) INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIR}) - LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) + # if building inside cmake do not add this lib + # as it will not exist at try compile time + IF(NOT "${ZLIB_LIBRARIES}" MATCHES cmzlib) + LIST(APPEND ADDITIONAL_LIBS ${ZLIB_LIBRARIES}) + ENDIF(NOT "${ZLIB_LIBRARIES}" MATCHES cmzlib) ENDIF(ZLIB_FOUND) MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR) MARK_AS_ADVANCED(CLEAR ZLIB_LIBRARY) @@ -157,7 +161,7 @@ IF(BZIP2_FOUND) INCLUDE_DIRECTORIES(${BZIP2_INCLUDE_DIR}) # if building inside cmake do not add this lib # as it will not exist at try compile time - IF(NOT BUILD_ARCHIVE_WITHIN_CMAKE) + IF(NOT "${BZIP2_LIBRARIES}" MATCHES cmbzip2) LIST(APPEND ADDITIONAL_LIBS ${BZIP2_LIBRARIES}) ENDIF() ENDIF(BZIP2_FOUND) |