diff options
author | Bernd Wachter <bwachter-tmw@lart.info> | 2009-04-06 02:44:41 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-06 15:00:14 +0200 |
commit | e11cb87959042e32b054991a5b19bc21bb2857f0 (patch) | |
tree | 6347dcf24884718209db5ca186eae5aae385ab43 | |
parent | e76f1fe00f03ae5977e94f830980034c2453d884 (diff) | |
download | mana-client-e11cb87959042e32b054991a5b19bc21bb2857f0.tar.gz mana-client-e11cb87959042e32b054991a5b19bc21bb2857f0.tar.bz2 mana-client-e11cb87959042e32b054991a5b19bc21bb2857f0.tar.xz mana-client-e11cb87959042e32b054991a5b19bc21bb2857f0.zip |
Fixed enet search macro for Windows
-rw-r--r-- | CMake/Modules/FindENet.cmake | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/CMake/Modules/FindENet.cmake b/CMake/Modules/FindENet.cmake index 90560063..98da51a3 100644 --- a/CMake/Modules/FindENet.cmake +++ b/CMake/Modules/FindENet.cmake @@ -10,23 +10,34 @@ IF (ENet_INCLUDE_DIR AND ENet_LIBRARY) SET(ENet_FIND_QUIETLY TRUE) ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY) -FIND_PATH(ENet_INCLUDE_DIR enet/enet.h - /usr/include - /usr/local/include +# for Windows we rely on the environement variables +# %INCLUDE% and %LIB%; FIND_LIBRARY checks %LIB% +# automatically on Windows +IF(WIN32) + FIND_PATH(ENet_INCLUDE_DIR enet/enet.h + $ENV{INCLUDE} ) - -FIND_LIBRARY(ENet_LIBRARY - NAMES enet - PATHS /usr/lib /usr/local/lib + FIND_LIBRARY(ENet_LIBRARY + NAMES enet + ) +ELSE() + FIND_PATH(ENet_INCLUDE_DIR enet/enet.h + /usr/include + /usr/local/include ) + FIND_LIBRARY(ENet_LIBRARY + NAMES enet + PATHS /usr/lib /usr/local/lib + ) +ENDIF() IF (ENet_INCLUDE_DIR AND ENet_LIBRARY) SET(ENET_FOUND TRUE) SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR}) SET(ENET_LIBRARIES ${ENet_LIBRARY}) -ELSE (ENet_INCLUDE_DIR AND ENet_LIBRARY) +ELSE () SET(ENET_FOUND FALSE) -ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY) +ENDIF () IF (ENET_FOUND) IF (NOT ENet_FIND_QUIETLY) |