Changeset 2509 for code/branches/buildsystem2/cmake/FindENet.cmake
- Timestamp:
- Dec 17, 2008, 8:59:48 PM (16 years ago)
- Location:
- code/branches/buildsystem2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/buildsystem2
- Property svn:ignore deleted
- Property svn:mergeinfo changed
/code/branches/buildsystem (added) merged: 1875,1882-1886,1975-1982,1991,1999,2054,2061,2135,2137-2139,2197-2199,2204,2214-2220,2223-2224,2229,2233-2244,2248-2249,2252-2253,2260,2275
-
code/branches/buildsystem2/cmake/FindENet.cmake
r1872 r2509 3 3 # 4 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 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. 8 9 # 9 10 # Borrowed from The Mana World … … 11 12 # 12 13 # Several changes and additions by Fabian 'x3n' Landau 14 # Lots of simplifications by Adrian Friedli 13 15 # > www.orxonox.net < 14 16 15 IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)16 SET(ENet_FIND_QUIETLY TRUE)17 ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)18 19 17 FIND_PATH(ENet_INCLUDE_DIR enet/enet.h 20 /usr/include21 /usr/local/include22 /usr/ pack/enet-2007-sd/include23 ../libs/enet-1.1/include24 ${DEPENDENCY_DIR}/enet-1.2/include18 PATHS 19 $ENV{ENETDIR} 20 /usr/local 21 /usr 22 PATH_SUFFIXES include 25 23 ) 26 24 27 25 FIND_LIBRARY(ENet_LIBRARY 28 26 NAMES enet 29 PATHS /usr/lib /usr/local/lib /usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/ 30 ../libs/enet-1.1 31 ${DEPENDENCY_DIR}/enet-1.2/lib 27 PATHS 28 $ENV{ENETDIR} 29 /usr/local 30 /usr 31 PATH_SUFFIXES lib 32 32 ) 33 33 34 SET(ENET_FOUND FALSE) 35 IF (ENet_INCLUDE_DIR AND ENet_LIBRARY) 36 SET(ENET_FOUND TRUE)37 SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR})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 38 39 IF (ENET_FOUND) 39 40 IF(WIN32) 40 41 SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm") 41 SET(ENet_LIBRARY ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES}) 42 SET(ENet_LIBRARIES ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES}) 43 ELSE(WIN32) 44 SET(ENet_LIBRARIES ${ENet_LIBRARY}) 42 45 ENDIF(WIN32) 43 44 SET(ENET_LIBRARIES ${ENet_LIBRARY})45 ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)46 47 IF (ENET_FOUND)48 IF (NOT ENet_FIND_QUIETLY)49 MESSAGE(STATUS "ENet was found.")50 IF (VERBOSE_FIND)51 MESSAGE (STATUS " include path: ${ENet_INCLUDE_DIR}")52 MESSAGE (STATUS " library path: ${ENet_LIBRARY}")53 MESSAGE (STATUS " libraries: enet")54 ENDIF (VERBOSE_FIND)55 ENDIF (NOT ENet_FIND_QUIETLY)56 ELSE (ENET_FOUND)57 IF (NOT ENet_INCLUDE_DIR)58 MESSAGE(SEND_ERROR "ENet include path was not found.")59 ENDIF (NOT ENet_INCLUDE_DIR)60 IF (NOT ENet_LIBRARY)61 MESSAGE(SEND_ERROR "ENet library was not found.")62 ENDIF (NOT ENet_LIBRARY)63 46 ENDIF (ENET_FOUND) 64 47 65 MARK_AS_ADVANCED(ENet_ INCLUDE_DIR ENet_LIBRARY)48 MARK_AS_ADVANCED(ENet_LIBRARY ENet_INCLUDE_DIR)
Note: See TracChangeset
for help on using the changeset viewer.