Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 543 was 536, checked in by landauf, 17 years ago

adjustments for windows

File size: 1.3 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    ../libs/enet-1.1/include
22    )
23
24FIND_LIBRARY(ENet_LIBRARY
25    NAMES enet
26    PATHS /usr/lib /usr/local/lib /usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/
27    ../libs/enet-1.1
28    )
29
30IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
31    SET(ENET_FOUND TRUE)
32    SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR})
33    SET(ENET_LIBRARIES ${ENet_LIBRARY})
34ELSE (ENet_INCLUDE_DIR AND ENet_LIBRARY)
35    SET(ENET_FOUND FALSE)
36ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
37
38IF (ENET_FOUND)
39    IF (NOT ENet_FIND_QUIETLY)
40        MESSAGE(STATUS "Found enet: ${ENet_LIBRARY}")
41    ENDIF (NOT ENet_FIND_QUIETLY)
42ELSE (ENET_FOUND)
43    IF (ENet_FIND_REQUIRED)
44        MESSAGE(FATAL_ERROR "Could NOT find enet")
45    ENDIF (ENet_FIND_REQUIRED)
46ENDIF (ENET_FOUND)
47
48MARK_AS_ADVANCED(ENet_INCLUDE_DIR ENet_LIBRARY)
Note: See TracBrowser for help on using the repository browser.