From 6a24bdfc4e040af52e4aef95d5c934ecc836a8b8 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 13 Jul 2010 10:43:41 -0400 Subject: Optionally use system bzip2 library (#10932) Add option CMAKE_USE_SYSTEM_BZIP2 and enable it automatically when CMAKE_USE_SYSTEM_LIBRARIES is on. While we're at it, remove XMLRPC from the list of system library options because we no longer provide it in source. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d77c377..3fda8e9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -69,6 +69,8 @@ MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES) CACHE BOOL "Use system-installed expat" FORCE) SET(CMAKE_USE_SYSTEM_ZLIB "${CMAKE_USE_SYSTEM_LIBRARIES}" CACHE BOOL "Use system-installed zlib" FORCE) + SET(CMAKE_USE_SYSTEM_BZIP2 "${CMAKE_USE_SYSTEM_LIBRARIES}" + CACHE BOOL "Use system-installed bzip2" FORCE) ENDIF(CMAKE_USE_SYSTEM_LIBRARIES_USER) # Optionally use system utility libraries. @@ -78,9 +80,10 @@ MACRO(CMAKE_HANDLE_SYSTEM_LIBRARIES) ${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CTEST_USE_XMLRPC" ON) CMAKE_DEPENDENT_OPTION(CMAKE_USE_SYSTEM_ZLIB "Use system-installed zlib" ${CMAKE_USE_SYSTEM_LIBRARIES} "NOT CMAKE_USE_SYSTEM_CURL" ON) + OPTION(CMAKE_USE_SYSTEM_BZIP2 "Use system-installed bzip2" OFF) # Mention to the user what system libraries are being used. - FOREACH(util CURL EXPAT XMLRPC ZLIB) + FOREACH(util BZIP2 CURL EXPAT ZLIB) IF(CMAKE_USE_SYSTEM_${util}) MESSAGE(STATUS "Using system-installed ${util}") ENDIF(CMAKE_USE_SYSTEM_${util}) -- cgit v0.12