Last change
on this file since 2258 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
|
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 | |
---|
17 | FIND_PATH(ENet_INCLUDE_DIR enet/enet.h |
---|
18 | PATHS |
---|
19 | $ENV{ENETDIR} |
---|
20 | /usr/local |
---|
21 | /usr |
---|
22 | PATH_SUFFIXES include |
---|
23 | ) |
---|
24 | |
---|
25 | FIND_LIBRARY(ENet_LIBRARY |
---|
26 | NAMES enet |
---|
27 | PATHS |
---|
28 | $ENV{ENETDIR} |
---|
29 | /usr/local |
---|
30 | /usr |
---|
31 | PATH_SUFFIXES lib |
---|
32 | ) |
---|
33 | |
---|
34 | # handle the QUIETLY and REQUIRED arguments and set ENET_FOUND to TRUE if |
---|
35 | # all listed variables are TRUE |
---|
36 | INCLUDE(FindPackageHandleStandardArgs) |
---|
37 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(ENet DEFAULT_MSG ENet_LIBRARY ENet_INCLUDE_DIR) |
---|
38 | |
---|
39 | IF (ENET_FOUND) |
---|
40 | IF(WIN32) |
---|
41 | SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm") |
---|
42 | SET(ENet_LIBRARIES ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES}) |
---|
43 | ELSE(WIN32) |
---|
44 | SET(ENet_LIBRARIES ${ENet_LIBRARY}) |
---|
45 | ENDIF(WIN32) |
---|
46 | ENDIF (ENET_FOUND) |
---|
47 | |
---|
48 | MARK_AS_ADVANCED(ENet_LIBRARY ENet_INCLUDE_DIR) |
---|
Note: See
TracBrowser
for help on using the repository browser.