Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem2/cmake/FindENet.cmake @ 2559

Last change on this file since 2559 was 2510, checked in by rgrieder, 16 years ago

Merged revisions 2279-2401 of the buildsystem branch to buildsystem2.

  • Property svn:eol-style set to native
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#
8# $ENETDIR is an environment variable used for finding enet.
9#
10#  Borrowed from The Mana World
11#  http://themanaworld.org/
12#
13# Several changes and additions by Fabian 'x3n' Landau
14# Lots of simplifications by Adrian Friedli
15#                 > www.orxonox.net <
16
17FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
18    PATHS
19    $ENV{ENETDIR}
20    /usr/local
21    /usr
22    PATH_SUFFIXES include
23    )
24
25FIND_LIBRARY(ENet_LIBRARY
26    NAMES enet
27    PATHS
28    $ENV{ENETDIR}
29    /usr/local
30    /usr
31    PATH_SUFFIXES lib
32    )
33
34# handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if
35# all listed variables are TRUE
36INCLUDE(FindPackageHandleStandardArgs)
37FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENet DEFAULT_MSG ENet_LIBRARY ENet_INCLUDE_DIR)
38
39IF (ENET_FOUND)
40    IF(WIN32)
41        SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm")
42        SET(ENet_LIBRARIES ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES})
43    ELSE(WIN32)
44        SET(ENet_LIBRARIES ${ENet_LIBRARY})
45    ENDIF(WIN32)
46ENDIF (ENET_FOUND)
47
48MARK_AS_ADVANCED(ENet_LIBRARY ENet_LIBRARIES ENet_INCLUDE_DIR)
Note: See TracBrowser for help on using the repository browser.