summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-12-21 18:37:22 (GMT)
committerBrad King <brad.king@kitware.com>2011-12-23 21:04:58 (GMT)
commite00dbe86d9ff0621780ff035122809cfcd36585b (patch)
treecde64b907eaf4344557828e741da450489aec0f6 /Utilities/cmlibarchive
parentb5dd9aa482377d847759c3a6468875f79a6e2d3d (diff)
downloadCMake-e00dbe86d9ff0621780ff035122809cfcd36585b.zip
CMake-e00dbe86d9ff0621780ff035122809cfcd36585b.tar.gz
CMake-e00dbe86d9ff0621780ff035122809cfcd36585b.tar.bz2
libarchive: Clean up configuration within CMake build
Require ZLIB but skip LZMA and XML support. Mark ZLIB and ICONV cache variables advanced.
Diffstat (limited to 'Utilities/cmlibarchive')
-rw-r--r--Utilities/cmlibarchive/CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt
index 27a3c59..760547a 100644
--- a/Utilities/cmlibarchive/CMakeLists.txt
+++ b/Utilities/cmlibarchive/CMakeLists.txt
@@ -164,9 +164,9 @@ IF(ZLIB_FOUND)
"#ifndef ZLIB_WINAPI\n#define ZLIB_WINAPI\n#endif\n#include <zlib.h>\nint main() {uLong f = zlibCompileFlags(); return (f&(1U<<10))?0:-1; }"
ZLIB_WINAPI)
ENDIF(WIN32 AND NOT CYGWIN)
+ELSE(ZLIB_FOUND)
+ MESSAGE(FATAL_ERROR "CMake requires zlib to be available to libarchive")
ENDIF(ZLIB_FOUND)
-MARK_AS_ADVANCED(CLEAR ZLIB_INCLUDE_DIR)
-MARK_AS_ADVANCED(CLEAR ZLIB_LIBRARY)
#
# Find BZip2
#
@@ -179,6 +179,8 @@ IF(BZIP2_FOUND)
ENDIF(BZIP2_FOUND)
MARK_AS_ADVANCED(CLEAR BZIP2_INCLUDE_DIR)
MARK_AS_ADVANCED(CLEAR BZIP2_LIBRARY)
+
+IF(0) # CMake does not need LZMA support in libarchive
#
# Find LZMA
#
@@ -194,6 +196,7 @@ ELSEIF(LZMADEC_FOUND)
INCLUDE_DIRECTORIES(${LZMADEC_INCLUDE_DIR})
LIST(APPEND ADDITIONAL_LIBS ${LZMADEC_LIBRARIES})
ENDIF(LZMA_FOUND)
+ENDIF()
#
# Check headers
@@ -517,6 +520,7 @@ ENDMACRO(CHECK_ICONV TRY_ICONV_CONST)
IF(ENABLE_ICONV)
FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
+ MARK_AS_ADVANCED(ICONV_INCLUDE_DIR)
IF(ICONV_INCLUDE_DIR)
#SET(INCLUDES ${INCLUDES} "iconv.h")
SET(HAVE_ICONV_H 1)
@@ -566,6 +570,7 @@ ELSE(ENABLE_ICONV)
UNSET(LIBICONV_PATH CACHE)
ENDIF(ENABLE_ICONV)
+IF(0) # CMake does not need XML support in libarchive
#
# Find Libxml2
#
@@ -591,6 +596,7 @@ ELSE(LIBXML2_FOUND)
LA_CHECK_INCLUDE_FILE("expat.h" HAVE_EXPAT_H)
ENDIF(EXPAT_FOUND)
ENDIF(LIBXML2_FOUND)
+ENDIF()
#
# Check functions