Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2582 was 2582, checked in by rgrieder, 15 years ago
  • Using dependency directory directly in root dir of a branch as primary folder (./libs resp. ./dependencies) Second priority is ../libs for MinGW and ../lib_dist/vc8/dependencies for msvc.
  • Moved compiler and linker flags to ConfigPlatforms.cmake
  • Solved additional libraries for ENet under MinGW directly in FindEnet.cmake
  • Property svn:eol-style set to native
File size: 1.3 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
[2581]17FIND_PATH(ENET_INCLUDE_DIR enet/enet.h
[2509]18    PATHS
19    $ENV{ENETDIR}
20    /usr/local
21    /usr
22    PATH_SUFFIXES include
[2579]23)
[2581]24FIND_LIBRARY(ENET_LIBRARY_OPTIMIZED
[1505]25    NAMES enet
[2509]26    PATHS
27    $ENV{ENETDIR}
28    /usr/local
29    /usr
30    PATH_SUFFIXES lib
[2579]31)
[2581]32FIND_LIBRARY(ENET_LIBRARY_DEBUG
[2579]33    NAMES enet_${LIBRARY_DEBUG_POSTFIX}
34    PATHS
35    $ENV{ENETDIR}
36    /usr/local
37    /usr
38    PATH_SUFFIXES lib
39)
[1505]40
[2509]41# handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if
42# all listed variables are TRUE
[2581]43FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENET DEFAULT_MSG
44    ENET_LIBRARY_OPTIMIZED
45    ENET_INCLUDE_DIR
[2579]46)
[1776]47
[2579]48# Set optimized and debug libraries
[2582]49IF(MINGW)
50  # ENet is linked statically, hence we need to add some windows dependencies
51  HandleLibraryTypes(ENET ws2_32 winmm)
52ELSE(MINGW)
53  HandleLibraryTypes(ENET)
54ENDIF(MINGW)
[1505]55
[2579]56MARK_AS_ADVANCED(
[2581]57    ENET_LIBRARY
58    ENET_LIBRARY_OPTIMIZED
59    ENET_LIBRARY_DEBUG
60    ENET_INCLUDE_DIR
[2579]61)
Note: See TracBrowser for help on using the repository browser.