ENH: Adding option to use system-installed third-party libraries. This addresses bug#3653.

This commit is contained in:
Brad King 2006-10-19 15:17:58 -04:00
parent f91b3c1daa
commit 6ff05e3946
1 changed files with 12 additions and 1 deletions

View File

@ -36,6 +36,7 @@ cmake_data_dir="/share/cmake-${cmake_version}"
cmake_doc_dir="/doc/cmake-${cmake_version}"
cmake_man_dir="/man"
cmake_init_file=""
cmake_bootstrap_system_libs=""
# Determine whether this is a MinGW environment.
if echo "${cmake_system}" | grep MINGW >/dev/null 2>&1; then
@ -205,6 +206,10 @@ Configuration:
--parallel=n bootstrap cmake in parallel, where n is
number of nodes [1]
--init=FILE use FILE for cmake initialization
--system-libs use system-installed third-party libraries
(for use only by package maintainers)
--no-system-libs use cmake-provided third-party libraries
(default)
Directory and file names:
--prefix=PREFIX install files in tree rooted at PREFIX
@ -444,6 +449,12 @@ for a in "$@"; do
if echo $a | grep "^--init=" > /dev/null 2> /dev/null; then
cmake_init_file=`echo $a | sed "s/^--init=//"`
fi
if echo $a | grep "^--system-libs" > /dev/null 2> /dev/null; then
cmake_bootstrap_system_libs="-DCMAKE_USE_SYSTEM_LIBRARIES=1"
fi
if echo $a | grep "^--no-system-libs" > /dev/null 2> /dev/null; then
cmake_bootstrap_system_libs="-DCMAKE_USE_SYSTEM_LIBRARIES=0"
fi
if echo $a | grep "^--help" > /dev/null 2> /dev/null; then
cmake_usage
fi
@ -1287,7 +1298,7 @@ export CXX
export MAKE
# Run bootstrap CMake to configure real CMake
"${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}"
"${cmake_bootstrap_dir}/cmake" "${cmake_source_dir}" "-C${cmake_bootstrap_dir}/InitialCacheFlags.cmake" "-G${cmake_bootstrap_generator}" ${cmake_bootstrap_system_libs}
RES=$?
if [ "${RES}" -ne "0" ]; then
cmake_error 11 "Problem while running initial CMake"