aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <montel@kde.org>2007-03-23 16:40:59 +0000
committerLaurent Montel <montel@kde.org>2007-03-23 16:40:59 +0000
commit4ad4e863c2efdb6458ccb8e5c1932ef390d97b12 (patch)
tree23f796f968816855cdec7701f601388ea9eecd0f
parent90041a6a83ce05832de17840433e210739f128ad (diff)
downloadextra-cmake-modules-4ad4e863c2efdb6458ccb8e5c1932ef390d97b12.tar.gz
extra-cmake-modules-4ad4e863c2efdb6458ccb8e5c1932ef390d97b12.tar.bz2
It's better to move it here that kdebase
because if we don't install kdebase and try to compile and other module which requires plasma we will have an error but we didn't know which error (just plasma cmake file not installed I will remove it from kdebase next monday svn path=/trunk/KDE/kdelibs/; revision=645811
-rw-r--r--modules/FindPlasma.cmake44
1 files changed, 44 insertions, 0 deletions
diff --git a/modules/FindPlasma.cmake b/modules/FindPlasma.cmake
new file mode 100644
index 00000000..00e8a084
--- /dev/null
+++ b/modules/FindPlasma.cmake
@@ -0,0 +1,44 @@
+# cmake macro to see if we have Plasma from KDE workspace
+
+# PLASMA_INCLUDE_DIR
+# PLASMA_FOUND
+# Copyright (C) 2007 Brad Hards <bradh@frogmouth.net>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (PLASMA_INCLUDE_DIR)
+ # Already in cache, be silent
+ set(PLASMA_FOUND TRUE)
+endif (PLASMA_INCLUDE_DIR)
+
+
+FIND_PATH(PLASMA_INCLUDE_DIR NAMES plasma/kpanelapplet.h
+ PATHS
+ ${INCLUDE_INSTALL_DIR}
+ /usr/include
+ /usr/local/include
+)
+
+FIND_LIBRARY(PLASMA_LIBRARIES NAMES plasma
+ PATHS
+ ${LIB_INSTALL_DIR}
+ /usr/lib
+ /usr/local/lib
+)
+if (PLASMA_LIBRARIES AND PLASMA_INCLUDE_DIR)
+ set(PLASMA_FOUND TRUE)
+endif (PLASMA_LIBRARIES AND PLASMA_INCLUDE_DIR)
+
+if (PLASMA_FOUND)
+ if (NOT Plasma_FIND_QUIETLY)
+ message(STATUS "Found Plasma: ${PLASMA_LIBRARIES}")
+ endif (NOT Plasma_FIND_QUIETLY)
+else (PLASMA_FOUND)
+ if (Plasma_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find Plasma")
+ endif (Plasma_FIND_REQUIRED)
+endif (PLASMA_FOUND)
+
+MARK_AS_ADVANCED(PLASMA_INCLUDE_DIR PLASMA_LIBRARIES)