Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 2579 was 2579, checked in by rgrieder, 15 years ago
  • Equipped find scripts with debug/optimized functions. If you have different debug prefixes on your platform simply change ${LIBRARY_DEBUG_POSTFIX} ("_d" default).
  • Clean up in ConfigMSVC.cmake and ConfigMinGW.cmake
  • Also had a good look at the MinGW libraries according to the libs_1889_mingw.zip (no warranty at all, hope I got them all)
  • INSTALL commands are currently limited to non Windows platforms (don't yet know why it doesn't work)
  • 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)
24FIND_LIBRARY(ENet_LIBRARY_OPTIMIZED
25    NAMES enet
26    PATHS
27    $ENV{ENETDIR}
28    /usr/local
29    /usr
30    PATH_SUFFIXES lib
31)
32FIND_LIBRARY(ENet_LIBRARY_DEBUG
33    NAMES enet_${LIBRARY_DEBUG_POSTFIX}
34    PATHS
35    $ENV{ENETDIR}
36    /usr/local
37    /usr
38    PATH_SUFFIXES lib
39)
40
41# handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if
42# all listed variables are TRUE
43FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENet DEFAULT_MSG
44    ENet_LIBRARY_OPTIMIZED
45    ENet_INCLUDE_DIR
46)
47
48# Set optimized and debug libraries
49HandleLibraryTypes(ENet ${ENet_ADDITIONAL_LIBRARIES})
50
51MARK_AS_ADVANCED(
52    ENet_LIBRARY
53    ENet_LIBRARY_OPTIMIZED
54    ENet_LIBRARY_DEBUG
55    ENet_INCLUDE_DIR
56)
Note: See TracBrowser for help on using the repository browser.