Allow use system enet
This commit is contained in:
parent
b3f955f788
commit
c29643053e
@ -762,9 +762,17 @@ else()
|
||||
endif()
|
||||
|
||||
if(USE_ENET)
|
||||
add_subdirectory(external/enet)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/external/enet/include)
|
||||
set(ENET_LIBRARY enet)
|
||||
if(NOT ENABLE_SYSTEM_JSONCPP AND EXISTS ${PROJECT_SOURCE_DIR}/external/enet/include/enet/enet.h)
|
||||
add_subdirectory(external/enet)
|
||||
set(ENET_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/external/enet/include)
|
||||
set(ENET_LIBRARY enet)
|
||||
endif()
|
||||
if(NOT ENET_LIBRARY)
|
||||
find_library(ENET_LIBRARY NAMES enet)
|
||||
find_path(ENET_INCLUDE_DIR enet/enet.h)
|
||||
endif()
|
||||
include_directories(${ENET_INCLUDE_DIR})
|
||||
message(STATUS "Using enet: ${ENET_INCLUDE_DIR} ${ENET_LIBRARY}")
|
||||
endif()
|
||||
|
||||
set(FMcommon_SRCS
|
||||
|
Loading…
x
Reference in New Issue
Block a user