OpenSceneGraph/CMakeModules/FindZeroConf.cmake
Robert Osfield eed71f647d From Stephan Huber, "* imageio: removed ReaderWriterImageIO_IOS.cpp, refactored ReaderWriterImageIO to work on OS X and IOS
* avfoundation: added support for IOS (CoreVideo-support is still in development, works only for SDK >= 6.0, set IPHONE_SDKVER in cMake accordingly)
* zeroconf: added ZeroConf-device-plugin (Mac/Win only, linux implementation missing) to advertise and discover services via ZeroConf/Bonjour, on windows you'll need the Bonjour SDK from Apple
* osgosc: modified the example to demonstrate the usage of the ZeroConf-plugin (start the example with the command-line-argument --zeroconf)
* SlideShowConstructor: enable/disable CoreVideo via a environment variable (P3D_ENABLE_CORE_VIDEO)
* RestHttp: mouse-motion-events get interpolated
* RestHttp: unhandled http-requests get sent as an user-event to the event-queue, all arguments get attached as user-values to the event
* modified some CMakeModules to work correctly when compiling for IOS
* fixed a compile-error for IOS in GraphicsWindowIOS
* some minor bugfixes"
2012-12-05 17:15:53 +00:00

48 lines
1.2 KiB
CMake
Executable File

# 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()