aboutsummaryrefslogtreecommitdiff
path: root/modules/FindQImageBlitz.cmake
diff options
context:
space:
mode:
authorAllen Winter <allen.winter@kdab.com>2011-06-28 17:13:05 -0400
committerAllen Winter <allen.winter@kdab.com>2011-06-28 17:13:05 -0400
commite15ffacc69242c89107afbfda6f8ece9f2b56633 (patch)
tree34bed177321c49f883d9d75616947a18f38c037f /modules/FindQImageBlitz.cmake
parent5c79bed7250cb2f854bfb4f20e4d266925d94b54 (diff)
parentc06badd8d431583071cad638fea082ca0776a0a3 (diff)
downloadextra-cmake-modules-e15ffacc69242c89107afbfda6f8ece9f2b56633.tar.gz
extra-cmake-modules-e15ffacc69242c89107afbfda6f8ece9f2b56633.tar.bz2
Merge branch 'allen' of /data/kde/trunk/KDE/kdelibs
Diffstat (limited to 'modules/FindQImageBlitz.cmake')
-rw-r--r--modules/FindQImageBlitz.cmake51
1 files changed, 51 insertions, 0 deletions
diff --git a/modules/FindQImageBlitz.cmake b/modules/FindQImageBlitz.cmake
new file mode 100644
index 00000000..1b34741e
--- /dev/null
+++ b/modules/FindQImageBlitz.cmake
@@ -0,0 +1,51 @@
+# - Try to find the qimageblitz lib
+# Once done this will define
+#
+# QIMAGEBLITZ_FOUND - system has qimageblitz lib
+# QIMAGEBLITZ_INCLUDES - the qimageblitz include directory
+# QIMAGEBLITZ_LIBRARIES - The libraries needed to use qimageblitz
+
+# Copyright (c) 2006, Montel Laurent, <montel@kde.org>
+# Copyright (c) 2007, Allen Winter, <winter@kde.org>
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+include(FindLibraryWithDebug)
+
+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
+ find_package(PkgConfig)
+ pkg_check_modules(PC_QIMAGEBLITZ QUIET qimageblitz)
+endif (NOT WIN32)
+
+find_path(QIMAGEBLITZ_INCLUDES
+ NAMES
+ qimageblitz.h
+ PATH_SUFFIXES qimageblitz
+ HINTS
+ $ENV{QIMAGEBLITZDIR}/include
+ ${PC_QIMAGEBLITZ_INCLUDEDIR}
+ ${KDE4_INCLUDE_DIR}
+ ${INCLUDE_INSTALL_DIR}
+)
+
+find_library_with_debug(QIMAGEBLITZ_LIBRARIES
+ WIN32_DEBUG_POSTFIX d
+ qimageblitz
+ HINTS
+ $ENV{QIMAGEBLITZDIR}/lib
+ ${PC_QIMAGEBLITZ_LIBDIR}
+ ${KDE4_LIB_DIR}
+ ${LIB_INSTALL_DIR}
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(QImageBlitz DEFAULT_MSG
+ QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES)
+
+mark_as_advanced(QIMAGEBLITZ_INCLUDES QIMAGEBLITZ_LIBRARIES)