From 177c7de4e2809e2f5117d1ed25c1b36f93c1d36c Mon Sep 17 00:00:00 2001 From: Christian Wiese Date: Wed, 4 May 2011 12:00:28 +0200 Subject: [PATCH] cmake: improved to use libraries provided by the system as much ass possible --- develop/cmake/cmake.conf | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/develop/cmake/cmake.conf b/develop/cmake/cmake.conf index 3a2013b66..1a65e00ed 100644 --- a/develop/cmake/cmake.conf +++ b/develop/cmake/cmake.conf @@ -25,3 +25,14 @@ hook_add preconf 9 'cmake_preconf' configscript="../configure" confopt="--prefix=$root/$prefix" + +# first try to use all system-installed third-party libraries +var_append confopt ' ' "--system-libs" + +# use cmake-provided libraries if they are not available on the system +for x in curl expat zlib bzip2 libarchive ; do + if ! pkginstalled -f $x; then + echo_status "Using cmake-provided $x (not available on the system)" + var_append confopt ' ' "--no-system-$x" + fi +done