Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/FICN/cmake/FindENet.cmake @ 473

Last change on this file since 473 was 337, checked in by bknecht, 17 years ago

merged merger to FICN branch

File size: 1.2 KB
Line 
1# - Try to find enet
2# Once done this will define
3#
4#  ENET_FOUND - system has enet
5#  ENET_INCLUDE_DIR - the enet include directory
6#  ENET_LIBRARIES - the libraries needed to use enet
7#  ENET_DEFINITIONS - Compiler switches required for using enet
8#
9#  Borrowed from The Mana World
10#  http://themanaworld.org/
11#
12
13IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
14   SET(ENet_FIND_QUIETLY TRUE)
15ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
16
17FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
18    /usr/include
19    /usr/local/include
20    /usr/pack/enet-2007-sd/include
21    )
22
23FIND_LIBRARY(ENet_LIBRARY
24    NAMES enet
25    PATHS /usr/lib /usr/local/lib /usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/
26    )
27
28IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
29    SET(ENET_FOUND TRUE)
30    SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR})
31    SET(ENET_LIBRARIES ${ENet_LIBRARY})
32ELSE (ENet_INCLUDE_DIR AND ENet_LIBRARY)
33    SET(ENET_FOUND FALSE)
34ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
35
36IF (ENET_FOUND)
37    IF (NOT ENet_FIND_QUIETLY)
38        MESSAGE(STATUS "Found enet: ${ENet_LIBRARY}")
39    ENDIF (NOT ENet_FIND_QUIETLY)
40ELSE (ENET_FOUND)
41    IF (ENet_FIND_REQUIRED)
42        MESSAGE(FATAL_ERROR "Could NOT find enet")
43    ENDIF (ENet_FIND_REQUIRED)
44ENDIF (ENET_FOUND)
45
46MARK_AS_ADVANCED(ENet_INCLUDE_DIR ENet_LIBRARY)
Note: See TracBrowser for help on using the repository browser.