summaryrefslogtreecommitdiff
path: root/cmake/Modules/FindLibavahi.cmake
diff options
context:
space:
mode:
authorYour Name <you@example.com>2017-02-08 16:18:39 -0800
committerYour Name <you@example.com>2017-02-08 16:18:39 -0800
commit5ccd1ad50d368cae07613050c9e071effb5f4be1 (patch)
tree29cb8868d559fa4a8d1d4ca211f1f56c5cdcf3a0 /cmake/Modules/FindLibavahi.cmake
downloadsmartdevicelink-master.tar.gz
Initial smartdevicelink commitHEADmaster
Diffstat (limited to 'cmake/Modules/FindLibavahi.cmake')
-rw-r--r--cmake/Modules/FindLibavahi.cmake29
1 files changed, 29 insertions, 0 deletions
diff --git a/cmake/Modules/FindLibavahi.cmake b/cmake/Modules/FindLibavahi.cmake
new file mode 100644
index 000000000..2bc905505
--- /dev/null
+++ b/cmake/Modules/FindLibavahi.cmake
@@ -0,0 +1,29 @@
+# --- Check libavahi-common, libavahi-client availability
+
+FIND_LIBRARY(
+ LIBAVAHI_CLIENT
+ NAMES libavahi-client.so
+ PATHS /usr/local/lib /usr/lib /opt/local/include /usr/lib/i386-linux-gnu/
+ )
+
+if (NOT LIBAVAHI_CLIENT)
+ message(STATUS " libavahi-client is not found")
+ message(STATUS " To install it type in the command line:")
+ message(STATUS " sudo apt-get install libavahi-client-dev")
+endif (NOT LIBAVAHI_CLIENT)
+
+FIND_LIBRARY(
+ LIBAVAHI_COMMON
+ NAMES libavahi-common.so
+ PATHS /usr/local/lib /usr/lib /opt/local/include /usr/lib/i386-linux-gnu/
+ )
+
+if (NOT LIBAVAHI_COMMON)
+ message(STATUS " libavahi-common is not found")
+ message(STATUS " To install it type in the command line:")
+ message(STATUS " sudo apt-get install libavahi-common-dev")
+endif (NOT LIBAVAHI_COMMON)
+
+if (NOT LIBAVAHI_COMMON OR NOT LIBAVAHI_CLIENT)
+ message(FATAL_ERROR "One of necesary component of libavahi is not found. Exiting!")
+endif(NOT LIBAVAHI_COMMON OR NOT LIBAVAHI_CLIENT) \ No newline at end of file