From 691b690afed6ec8cf282be0f1cd23d3bce17deee Mon Sep 17 00:00:00 2001 From: degasus Date: Sun, 1 Mar 2015 02:45:04 +0100 Subject: [PATCH] enet: Search for shared library --- CMakeLists.txt | 9 +++++++-- Source/Core/Common/TraversalClient.h | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 612de7ca48..37c247acc1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -536,9 +536,14 @@ include_directories(Source/Core) add_subdirectory(Externals/Bochs_disasm) include_directories(Externals/Bochs_disasm) -if(NOT ENET_FOUND) +if(NOT APPLE AND NOT ANDROID) + check_lib(ENET enet enet/enet.h QUIET) +endif() +if (ENET_FOUND) + message("Using shared enet") +else() message("Using static enet from Externals") - include_directories(Externals) + include_directories(Externals/enet/include) add_subdirectory(Externals/enet) endif() LIST(APPEND LIBS enet) diff --git a/Source/Core/Common/TraversalClient.h b/Source/Core/Common/TraversalClient.h index 7418aa8d25..0263d863fb 100644 --- a/Source/Core/Common/TraversalClient.h +++ b/Source/Core/Common/TraversalClient.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include "Common/Common.h" #include "Common/Thread.h" #include "Common/TraversalProto.h"