Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2595 was 2583, checked in by rgrieder, 16 years ago
  • Use $ENV{BOOST_ROOT} to find boost if possible
  • Set TOLUA_PARSER_WORKING_DIRECTORY now defaults to ${CMAKE_RUNTIME_OUTPUT_PATH}
  • Added bin/release, bin/debug, release and debug to the Ogre library prefix paths
  • Lots of small fixes and changes
  • Property svn:eol-style set to native
File size: 1.4 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
17INCLUDE(FindPackageHandleStandardArgs)
18INCLUDE(HandleLibraryTypes)
19
20FIND_PATH(ENET_INCLUDE_DIR enet/enet.h
21    PATHS
22    $ENV{ENETDIR}
23    /usr/local
24    /usr
25    PATH_SUFFIXES include
26)
27FIND_LIBRARY(ENET_LIBRARY_OPTIMIZED
28    NAMES enet
29    PATHS
30    $ENV{ENETDIR}
31    /usr/local
32    /usr
33    PATH_SUFFIXES lib
34)
35FIND_LIBRARY(ENET_LIBRARY_DEBUG
36    NAMES enet${LIBRARY_DEBUG_POSTFIX}
37    PATHS
38    $ENV{ENETDIR}
39    /usr/local
40    /usr
41    PATH_SUFFIXES lib
42)
43
44# handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if
45# all listed variables are TRUE
46FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENET DEFAULT_MSG
47    ENET_LIBRARY_OPTIMIZED
48    ENET_INCLUDE_DIR
49)
50
51# Set optimized and debug libraries
52IF(MINGW)
53  # ENet is linked statically, hence we need to add some windows dependencies
54  HandleLibraryTypes(ENET ws2_32 winmm)
55ELSE(MINGW)
56  HandleLibraryTypes(ENET)
57ENDIF(MINGW)
58
59MARK_AS_ADVANCED(
60    ENET_LIBRARY
61    ENET_LIBRARY_OPTIMIZED
62    ENET_LIBRARY_DEBUG
63    ENET_INCLUDE_DIR
64)
Note: See TracBrowser for help on using the repository browser.