Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/buildsystem/cmake/FindENet.cmake @ 2157

Last change on this file since 2157 was 2054, checked in by adrfried, 16 years ago

FindALUT and FindENet cleaned up

  • Property svn:eol-style set to native
File size: 1.2 KB
RevLine 
[1505]1# - Try to find enet
2# Once done this will define
3#
4#  ENET_FOUND - system has enet
[2054]5#  ENet_INCLUDE_DIR - the enet include directory
6#  ENet_LIBRARIES - the libraries needed to use enet
[1505]7#
[2054]8# $ENETDIR is an environment variable used for finding enet.
9#
[1505]10#  Borrowed from The Mana World
11#  http://themanaworld.org/
12#
[1776]13# Several changes and additions by Fabian 'x3n' Landau
[2054]14# Lots of simplifications by Adrian Friedli
[1776]15#                 > www.orxonox.net <
[1505]16
17FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
[2054]18    PATHS
19    $ENV{ENETDIR}
20    /usr/local
21    /usr
22    PATH_SUFFIXES include
[1505]23    )
24
25FIND_LIBRARY(ENet_LIBRARY
26    NAMES enet
[2054]27    PATHS
28    $ENV{ENETDIR}
29    /usr/local
30    /usr
31    PATH_SUFFIXES lib
[1505]32    )
33
[2054]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)
[1776]38
[2054]39IF (ENET_FOUND)
[1776]40    IF(WIN32)
41        SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm")
[2054]42        SET(ENet_LIBRARIES ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES})
43    ELSE(WIN32)
44        SET(ENet_LIBRARIES ${ENet_LIBRARY})
[1776]45    ENDIF(WIN32)
[1505]46ENDIF (ENET_FOUND)
47
[2054]48MARK_AS_ADVANCED(ENet_LIBRARY ENet_INCLUDE_DIR)
Note: See TracBrowser for help on using the repository browser.