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 | # ENET_DEFINITIONS - Compiler switches required for using enet |
---|
8 | # |
---|
9 | # Borrowed from The Mana World |
---|
10 | # http://themanaworld.org/ |
---|
11 | # |
---|
12 | |
---|
13 | IF (ENet_INCLUDE_DIR AND ENet_LIBRARY) |
---|
14 | SET(ENet_FIND_QUIETLY TRUE) |
---|
15 | ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY) |
---|
16 | |
---|
17 | FIND_PATH(ENet_INCLUDE_DIR enet/enet.h |
---|
18 | /usr/include |
---|
19 | /usr/local/include |
---|
20 | /usr/pack/enet-2007-sd/include |
---|
21 | ../libs/enet-1.1/include |
---|
22 | ) |
---|
23 | |
---|
24 | FIND_LIBRARY(ENet_LIBRARY |
---|
25 | NAMES enet |
---|
26 | PATHS /usr/lib /usr/local/lib /usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/ |
---|
27 | ../libs/enet-1.1 |
---|
28 | ) |
---|
29 | |
---|
30 | IF (ENet_INCLUDE_DIR AND ENet_LIBRARY) |
---|
31 | SET(ENET_FOUND TRUE) |
---|
32 | SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR}) |
---|
33 | SET(ENET_LIBRARIES ${ENet_LIBRARY}) |
---|
34 | ELSE (ENet_INCLUDE_DIR AND ENet_LIBRARY) |
---|
35 | SET(ENET_FOUND FALSE) |
---|
36 | ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY) |
---|
37 | |
---|
38 | IF (ENET_FOUND) |
---|
39 | IF (NOT ENet_FIND_QUIETLY) |
---|
40 | MESSAGE(STATUS "Found enet: ${ENet_LIBRARY}") |
---|
41 | ENDIF (NOT ENet_FIND_QUIETLY) |
---|
42 | ELSE (ENET_FOUND) |
---|
43 | IF (ENet_FIND_REQUIRED) |
---|
44 | MESSAGE(FATAL_ERROR "Could NOT find enet") |
---|
45 | ENDIF (ENet_FIND_REQUIRED) |
---|
46 | ENDIF (ENET_FOUND) |
---|
47 | |
---|
48 | MARK_AS_ADVANCED(ENet_INCLUDE_DIR ENet_LIBRARY) |
---|
Note: See
TracBrowser
for help on using the repository browser.