forked from openscenegraph/OpenSceneGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
FindZeroConf.cmake
47 lines (41 loc) · 1.19 KB
/
FindZeroConf.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Locate ZeroConf / Bonjour
# This module defines
# ZEROCONF_LIBRARY
# ZEROCONF_FOUND, if false, do not try to link to gdal
# ZEROCONF_INCLUDE_DIR, where to find the headers
#
# $ZEROCONF_DIR is an environment variable that would
# correspond to the ./configure --prefix=$ZEROCONF_DIR
# Created by Stephan Maximilian Huber
SET(ZEROCONF_FOUND "NO")
IF(APPLE)
# bonjour is part of the system on os x / ios
SET(ZEROCONF_FOUND "YES")
ELSE()
IF(WIN32)
# find the Bonjour SDK
FIND_PATH(ZEROCONF_INCLUDE_DIR dnssd.h
$ENV{ZEROCONF_DIR}/include
$ENV{ZEROCONF_DIR}
NO_DEFAULT_PATH
)
FIND_PATH(ZEROCONF_INCLUDE_DIR dnssd.h
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
NO_DEFAULT_PATH
PATH_SUFFIXES include
)
FIND_PATH(ZEROCONF_INCLUDE_DIR dnssd.h)
FIND_LIBRARY(ZEROCONF_LIBRARY dnssd
PATHS ${CMAKE_PREFIX_PATH} # Unofficial: We are proposing this.
NO_DEFAULT_PATH
PATH_SUFFIXES lib64 lib
)
FIND_LIBRARY(ZEROCONF_LIBRARY dnssd)
SET(ZEROCONF_FOUND "NO")
IF(ZEROCONF_LIBRARY AND ZEROCONF_INCLUDE_DIR)
SET(ZEROCONF_FOUND "YES")
ENDIF()
ELSE()
# TODO find AVAHI on linux
ENDIF()
ENDIF()