Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

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

  • 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
[2509]5#  ENet_INCLUDE_DIR - the enet include directory
6#  ENet_LIBRARIES - the libraries needed to use enet
[1505]7#
[2509]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
[2509]14# Lots of simplifications by Adrian Friedli
[1776]15#                 > www.orxonox.net <
[1505]16
17FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
[2509]18    PATHS
19    $ENV{ENETDIR}
20    /usr/local
21    /usr
22    PATH_SUFFIXES include
[1505]23    )
24
25FIND_LIBRARY(ENet_LIBRARY
26    NAMES enet
[2509]27    PATHS
28    $ENV{ENETDIR}
29    /usr/local
30    /usr
31    PATH_SUFFIXES lib
[1505]32    )
33
[2509]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
[2509]39IF (ENET_FOUND)
[1776]40    IF(WIN32)
41        SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm")
[2509]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
[2510]48MARK_AS_ADVANCED(ENet_LIBRARY ENet_LIBRARIES ENet_INCLUDE_DIR)
Note: See TracBrowser for help on using the repository browser.