Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/cmake/FindENet.cmake @ 1201

Last change on this file since 1201 was 790, checked in by nicolasc, 17 years ago

merged FICN back into trunk
awaiting release.

File size: 1.5 KB
RevLine 
[536]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
[547]30IF(WIN32)
31  SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm")
[549]32  SET(ENet_LIBRARY ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES})
[547]33ENDIF(WIN32)
34
[536]35IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
36    SET(ENET_FOUND TRUE)
37    SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR})
38    SET(ENET_LIBRARIES ${ENet_LIBRARY})
39ELSE (ENet_INCLUDE_DIR AND ENet_LIBRARY)
40    SET(ENET_FOUND FALSE)
41ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
42
43IF (ENET_FOUND)
44    IF (NOT ENet_FIND_QUIETLY)
45        MESSAGE(STATUS "Found enet: ${ENet_LIBRARY}")
46    ENDIF (NOT ENet_FIND_QUIETLY)
47ELSE (ENET_FOUND)
48    IF (ENet_FIND_REQUIRED)
49        MESSAGE(FATAL_ERROR "Could NOT find enet")
50    ENDIF (ENet_FIND_REQUIRED)
51ENDIF (ENET_FOUND)
52
53MARK_AS_ADVANCED(ENet_INCLUDE_DIR ENet_LIBRARY)
Note: See TracBrowser for help on using the repository browser.