aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Montel <montel@kde.org>2007-05-28 09:11:12 +0000
committerLaurent Montel <montel@kde.org>2007-05-28 09:11:12 +0000
commit021739ef3018d7b3fbd5b2713d040eb311461c55 (patch)
tree4e6f97e3c28101949d67dcd549598d1dbd6a4422
parent5c089deeaf0ba27a8ad294cef83b4ac81d302e21 (diff)
downloadextra-cmake-modules-021739ef3018d7b3fbd5b2713d040eb311461c55.tar.gz
extra-cmake-modules-021739ef3018d7b3fbd5b2713d040eb311461c55.tar.bz2
Need by playground/pim
svn path=/trunk/KDE/kdelibs/; revision=668978
-rw-r--r--modules/FindKdepim.cmake46
1 files changed, 46 insertions, 0 deletions
diff --git a/modules/FindKdepim.cmake b/modules/FindKdepim.cmake
new file mode 100644
index 00000000..ac33bc1f
--- /dev/null
+++ b/modules/FindKdepim.cmake
@@ -0,0 +1,46 @@
+# cmake macro to see if we have kdepim installed
+
+# KDEPIM_INCLUDE_DIR
+# KDEPIM_FOUND
+# Copyright (C) 2007 Laurent Montel <montel@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+if (KDEPIM_INCLUDE_DIR)
+ # Already in cache, be silent
+ set(KDEPIM_FOUND TRUE)
+endif (KDEPIM_INCLUDE_DIR)
+
+
+FIND_PATH(KDEPIM_INCLUDE_DIR NAMES kdepimprotocols.h
+ PATHS
+ ${INCLUDE_INSTALL_DIR}
+ /usr/include
+ /usr/local/include
+)
+
+FIND_LIBRARY(KDEPIM_LIBRARIES NAMES kdepim
+ PATHS
+ ${LIB_INSTALL_DIR}
+ /usr/lib
+ /usr/local/lib
+)
+
+if (KDEPIM_LIBRARIES AND KDEPIM_INCLUDE_DIR)
+ set(KDEPIM_FOUND TRUE)
+endif (KDEPIM_LIBRARIES AND KDEPIM_INCLUDE_DIR)
+
+if (KDEPIM_FOUND)
+ if (NOT Kdepim_FIND_QUIETLY)
+ message(STATUS "Found Kdepim: ${KDEPIM_LIBRARIES}")
+ endif (NOT Kdepim_FIND_QUIETLY)
+else (KDEPIM_FOUND)
+ if (Kdepim_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find Kdepim")
+ endif (Kdepim_FIND_REQUIRED)
+endif (KDEPIM_FOUND)
+
+MARK_AS_ADVANCED(KDEPIM_INCLUDE_DIR KDEPIM_LIBRARIES)
+