aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Faure <faure@kde.org>2008-03-13 12:00:19 +0000
committerDavid Faure <faure@kde.org>2008-03-13 12:00:19 +0000
commite3d7adc9d5434217f69b6b42834bc08a8004b93e (patch)
treee799d317ac05045c9bbc20d4d7740992773abd74
parentadd74ab676ed374c6f7a735067040d1e0c8c76bd (diff)
downloadextra-cmake-modules-e3d7adc9d5434217f69b6b42834bc08a8004b93e.tar.gz
extra-cmake-modules-e3d7adc9d5434217f69b6b42834bc08a8004b93e.tar.bz2
Also use pkgconfig to find QImageBlitz, since it installs a .pc file.
svn path=/branches/KDE/4.0/kdelibs/; revision=785148
-rw-r--r--modules/FindBlitz.cmake12
-rw-r--r--modules/FindQImageBlitz.cmake9
2 files changed, 21 insertions, 0 deletions
diff --git a/modules/FindBlitz.cmake b/modules/FindBlitz.cmake
index 6f3e912b..a7aa4a14 100644
--- a/modules/FindBlitz.cmake
+++ b/modules/FindBlitz.cmake
@@ -1,3 +1,6 @@
+################################################################
+########## DEPRECATED, use FindQImageBlitz instead #############
+################################################################
# - Try to find blitz lib
# Once done this will define
#
@@ -16,12 +19,20 @@ if (BLITZ_INCLUDES AND BLITZ_LIBRARIES)
set(Blitz_FIND_QUIETLY TRUE)
endif (BLITZ_INCLUDES AND BLITZ_LIBRARIES)
+if (NOT WIN32)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ include(UsePkgConfig)
+ pkgconfig(qimageblitz _QIMAGEBLITZ_INCLUDEDIR _QIMAGEBLITZ_LIBDIR _dummyLinkFlags _dummyCflags)
+endif (NOT WIN32)
+
find_path(BLITZ_INCLUDES
NAMES
qimageblitz.h
PATH_SUFFIXES qimageblitz
PATHS
$ENV{QIMAGEBLITZDIR}/include
+ ${_QIMAGEBLITZ_INCLUDEDIR}
${KDE4_INCLUDE_DIR}
${INCLUDE_INSTALL_DIR}
)
@@ -31,6 +42,7 @@ find_library_with_debug(BLITZ_LIBRARIES
qimageblitz
PATHS
$ENV{QIMAGEBLITZDIR}/lib
+ ${_QIMAGEBLITZ_LIBDIR}
${KDE4_LIB_DIR}
${LIB_INSTALL_DIR}
)
diff --git a/modules/FindQImageBlitz.cmake b/modules/FindQImageBlitz.cmake
index 24a5d142..978b2588 100644
--- a/modules/FindQImageBlitz.cmake
+++ b/modules/FindQImageBlitz.cmake
@@ -16,12 +16,20 @@ if (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES)
set(QImageBlitz_FIND_QUIETLY TRUE)
endif (QIMAGEBLITZ_INCLUDES AND QIMAGEBLITZ_LIBRARIES)
+if (NOT WIN32)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ include(UsePkgConfig)
+ pkgconfig(qimageblitz _QIMAGEBLITZ_INCLUDEDIR _QIMAGEBLITZ_LIBDIR _dummyLinkFlags _dummyCflags)
+endif (NOT WIN32)
+
find_path(QIMAGEBLITZ_INCLUDES
NAMES
qimageblitz.h
PATH_SUFFIXES qimageblitz
PATHS
$ENV{QIMAGEBLITZDIR}/include
+ ${_QIMAGEBLITZ_INCLUDEDIR}
${KDE4_INCLUDE_DIR}
${INCLUDE_INSTALL_DIR}
)
@@ -31,6 +39,7 @@ find_library_with_debug(QIMAGEBLITZ_LIBRARIES
qimageblitz
PATHS
$ENV{QIMAGEBLITZDIR}/lib
+ ${_QIMAGEBLITZ_LIBDIR}
${KDE4_LIB_DIR}
${LIB_INSTALL_DIR}
)