Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/merger/cmake/FindENet.cmake @ 294

Last change on this file since 294 was 294, checked in by nicolasc, 16 years ago

added FindENet and FindBoost
FindBoost does not work (yet)

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