diff options
author | Brian Callahan <dodonpachi-github@mailinator.com> | 2013-06-17 20:00:16 -0400 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-06-18 09:01:06 +0200 |
commit | f1be42335770c4e59ad83fc69e7244c5bfb3b188 (patch) | |
tree | 5134fd27d428c7b6d5233521fbeb94fc3139ebfb /src | |
parent | daa4be8dcd74584345aa3e99da4711b708e99875 (diff) | |
download | manaserv-f1be42335770c4e59ad83fc69e7244c5bfb3b188.tar.gz manaserv-f1be42335770c4e59ad83fc69e7244c5bfb3b188.tar.bz2 manaserv-f1be42335770c4e59ad83fc69e7244c5bfb3b188.tar.xz manaserv-f1be42335770c4e59ad83fc69e7244c5bfb3b188.zip |
Allow manaserv to be built with external ENet
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5a92e29e..968c40b9 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -17,9 +17,15 @@ ENDIF() IF (POLICY CMP0015) CMAKE_POLICY(SET CMP0015 OLD) ENDIF() -INCLUDE_DIRECTORIES("../libs/enet/include") -LINK_DIRECTORIES("../libs/enet") -SET(INTERNAL_LIBRARIES enet) + +IF (ENABLE_EXTERNAL_ENET) + INCLUDE_DIRECTORIES(${ENet_INCLUDE_DIR}) + SET(OPTIONAL_LIBRARIES ${OPTIONAL_LIBRARIES} ${ENet_LIBRARY}) +ELSE (ENABLE_EXTERNAL_ENET) + INCLUDE_DIRECTORIES("../libs/enet/include") + LINK_DIRECTORIES("../libs/enet") + SET(INTERNAL_LIBRARIES enet) +ENDIF (ENABLE_EXTERNAL_ENET) # enable rc-handling with mingw # most likely this part can be kicked out with some later cmake version |