29 lines
822 B
CMake
29 lines
822 B
CMake
|
# Tries to find ENET (http://enet.bespin.org) a simple and fast
|
||
|
# network library by Lee Salzman
|
||
|
#
|
||
|
|
||
|
SET (ENET_FOUND FALSE)
|
||
|
|
||
|
FIND_PATH (ENET_INCLUDE_DIR enet/enet.h /usr/include/ /usr/local/include/ $ENV{ENET_PATH}/include $ENV{ENET_INCLUDE_PATH})
|
||
|
|
||
|
FIND_LIBRARY (ENET_LIBRARIES NAMES enet PATHS /usr/lib /usr/local/lib $ENV{ENET_PATH} $ENV{ENET_PATH}/lib ENV{ENET_LIBRARY_PATH})
|
||
|
|
||
|
IF (ENET_INCLUDE_DIR AND ENET_LIBRARIES)
|
||
|
SET (ENET_FOUND TRUE)
|
||
|
ENDIF (ENET_INCLUDE_DIR AND ENET_LIBRARIES)
|
||
|
|
||
|
IF (ENET_FOUND)
|
||
|
IF (NOT ENET_FIND_QUIETLY)
|
||
|
MESSAGE(STATUS "Found ENET: ${ENET_LIBRARIES}")
|
||
|
ENDIF (NOT ENET_FIND_QUIETLY)
|
||
|
ELSE (ENET_FOUND)
|
||
|
IF (ENET_FIND_REQUIRED)
|
||
|
MESSAGE(FATAL_ERROR "Could not find ENET")
|
||
|
ENDIF (ENET_FIND_REQUIRED)
|
||
|
ENDIF (ENET_FOUND)
|
||
|
|
||
|
MARK_AS_ADVANCED (
|
||
|
ENET_INCLUDE_DIR
|
||
|
ENET_LIBRARIES
|
||
|
)
|