aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2006-01-16 21:50:40 +0000
committerAlexander Neundorf <neundorf@kde.org>2006-01-16 21:50:40 +0000
commit0d87c6e52d0dae7cda5b61991089738c95fe8067 (patch)
tree2206d41c5204327b75faf79a6b1542a1840318eb
parent96c3dc0258b5ab49843a035f1f77d4847598f84c (diff)
downloadextra-cmake-modules-0d87c6e52d0dae7cda5b61991089738c95fe8067.tar.gz
extra-cmake-modules-0d87c6e52d0dae7cda5b61991089738c95fe8067.tar.bz2
use the new pkg-config cmake module in the libart module
the support for pkg-config was added with a custom cmake module (i.e. script, no editing of C++ sources involved) since somebody asked me, whether pkg-config is supported by cmake, ccmail to the mailinglist CCMAIL: kde-buildsystem@kde.org Alex svn path=/trunk/KDE/kdesdk/cmake/; revision=499066
-rw-r--r--modules/FindLibArt.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/FindLibArt.cmake b/modules/FindLibArt.cmake
index e170d0e9..e8bd5a6b 100644
--- a/modules/FindLibArt.cmake
+++ b/modules/FindLibArt.cmake
@@ -1,11 +1,20 @@
+INCLUDE(UsePkgConfig)
+
+# use pkg-config to get the directories and then use these values
+# in the FIND_PATH() and FIND_LIBRARY() calls
+PKGCONFIG(libart-2.0 _libArtIncDir _libArtLinkDir _libArtLinkFlags _libArtCflags)
+
+SET(LIBART_DEFINITIONS ${_libArtCflags})
FIND_PATH(LIBART_INCLUDE_DIR libart_lgpl/libart.h
+${_libArtIncDir}/libart-2.0
/usr/include/libart-2.0
/usr/local/include/libart-2.0
)
FIND_LIBRARY(LIBART_LIBRARY NAMES art_lgpl_2
PATHS
+${_libArtLinkDir}
/usr/lib
/usr/local/lib
)