aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJakub Stachowski <qbast@go2.pl>2007-04-14 18:40:13 +0000
committerJakub Stachowski <qbast@go2.pl>2007-04-14 18:40:13 +0000
commit2c7ef17dafd48c652a1bf81b6e2cc671db8cfe8d (patch)
tree493cb5417f45fd81208e4fa9a2845f205eec713a /modules
parent781577ce1680e84f0d04a6faf9693b57652e3599 (diff)
downloadextra-cmake-modules-2c7ef17dafd48c652a1bf81b6e2cc671db8cfe8d.tar.gz
extra-cmake-modules-2c7ef17dafd48c652a1bf81b6e2cc671db8cfe8d.tar.bz2
Add check for Avahi. If found, use avahi backend, else search for libdns_sd.
config-dnssd.h is not needed anymore. Include defs.h instead of copying defines. svn path=/trunk/KDE/kdelibs/; revision=653972
Diffstat (limited to 'modules')
-rw-r--r--modules/FindAvahi.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/FindAvahi.cmake b/modules/FindAvahi.cmake
new file mode 100644
index 00000000..89043f44
--- /dev/null
+++ b/modules/FindAvahi.cmake
@@ -0,0 +1,22 @@
+# Find Avahi. Only avahi-common/defs.h is really needed
+#
+# Copyright (c) 2007, Jakub Stachowski, <qbast@go2.pl>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+
+FIND_PATH(AVAHI_INCLUDE_DIR avahi-common/defs.h
+ /usr/include
+ /usr/local/include
+ )
+
+if(AVAHI_INCLUDE_DIR)
+ set(AVAHI_FOUND TRUE)
+ MESSAGE( STATUS "Avahi common includes found in ${AVAHI_INCLUDE_DIR}")
+else(AVAHI_INCLUDE_DIR)
+ MESSAGE( STATUS "Avahi not found")
+endif(AVAHI_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(AVAHI_INCLUDE_DIR)
+