mirror of
https://github.com/glest/glest-source.git
synced 2025-08-30 03:09:49 +02:00
- added support for miniupnpc 1.9
This commit is contained in:
@@ -23,6 +23,16 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
|
||||
option(FORCE_LUA_5_1 "Force looking for LUA 5.1" OFF)
|
||||
option(FORCE_LUA_5_2 "Force looking for LUA 5.2" OFF)
|
||||
option(FORCE_LUA_5_3 "Force looking for LUA 5.3" OFF)
|
||||
OPTION(FORCE_EMBEDDED_LIBS "Force use of embedded library code." OFF)
|
||||
option(DISABLE_IRCCLIENT "Disable libircclient support" OFF)
|
||||
|
||||
if(FORCE_EMBEDDED_LIBS)
|
||||
MESSAGE(STATUS "Forcing use of embedded libraries")
|
||||
option(FORCE_USE_EMBEDDED_IRCCLIENT "Use embedded to source code version of ircclient" ${FORCE_EMBEDDED_LIBS})
|
||||
else()
|
||||
|
||||
option(FORCE_USE_EMBEDDED_IRCCLIENT "Use embedded to source code version of ircclient" OFF)
|
||||
endif()
|
||||
|
||||
IF(WIN32)
|
||||
SET(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH}
|
||||
@@ -305,11 +315,16 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
|
||||
#IF(NOT WANT_STATIC_LIBS)
|
||||
#MESSAGE(STATUS "*** Searching for miniupnpc since WANT_STATIC_LIBS is off ...")
|
||||
#MESSAGE(STATUS "*** Searching for miniupnpc ...")
|
||||
FIND_PACKAGE(Miniupnpc)
|
||||
#ENDIF()
|
||||
IF(NOT FORCE_EMBEDDED_LIBS)
|
||||
FIND_PACKAGE(Miniupnpc)
|
||||
ENDIF()
|
||||
|
||||
if(NOT MINIUPNP_FOUND)
|
||||
MESSAGE(STATUS "*** Using EMBEDDED miniupnpc since dev system does not have it... MINIUPNP_FOUND [${MINIUPNP_FOUND}]")
|
||||
if(FORCE_EMBEDDED_LIBS OR NOT MINIUPNP_FOUND)
|
||||
if(FORCE_EMBEDDED_LIBS)
|
||||
MESSAGE(STATUS "*** Using EMBEDDED miniupnpc since FORCE_EMBEDDED_LIBS specified [${FORCE_EMBEDDED_LIBS}]")
|
||||
else()
|
||||
MESSAGE(STATUS "*** Using EMBEDDED miniupnpc since dev system does not have it... MINIUPNP_FOUND [${MINIUPNP_FOUND}]")
|
||||
endif()
|
||||
|
||||
if (NOT WIN32)
|
||||
add_definitions (-DMINIUPNPC_SET_SOCKET_TIMEOUT)
|
||||
@@ -368,22 +383,19 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST
|
||||
INCLUDE_DIRECTORIES( ${MG_INCLUDES_ROOT}xml/rapidxml )
|
||||
INCLUDE_DIRECTORIES("sources/")
|
||||
|
||||
option(DISABLE_IRCCLIENT "Disable libircclient support" OFF)
|
||||
option(FORCE_USE_EMBEDDED_IRCCLIENT "Use embedded to source code version of ircclient" OFF)
|
||||
|
||||
IF(NOT DISABLE_IRCCLIENT)
|
||||
#IF(NOT WANT_STATIC_LIBS)
|
||||
IF(NOT FORCE_USE_EMBEDDED_IRCCLIENT)
|
||||
MESSAGE(STATUS "*** Searching for libircclient since WANT_STATIC_LIBS is: ${WANT_STATIC_LIBS} ...")
|
||||
FIND_PACKAGE(Ircclient)
|
||||
IF(NOT FORCE_USE_EMBEDDED_IRCCLIENT)
|
||||
MESSAGE(STATUS "*** Searching for libircclient since WANT_STATIC_LIBS is: ${WANT_STATIC_LIBS} ...")
|
||||
FIND_PACKAGE(Ircclient)
|
||||
ENDIF()
|
||||
|
||||
if(NOT IRCCLIENT_FOUND OR FORCE_USE_EMBEDDED_IRCCLIENT)
|
||||
if(NOT FORCE_USE_EMBEDDED_IRCCLIENT)
|
||||
MESSAGE(STATUS "*** Using EMBEDDED libircclient since this system does not have it... IRCCLIENT_FOUND [${IRCCLIENT_FOUND}]")
|
||||
else()
|
||||
MESSAGE(STATUS "*** Using EMBEDDED libircclient because it was forced by option 'FORCE_USE_EMBEDDED_IRCCLIENT'")
|
||||
endif()
|
||||
if(NOT FORCE_USE_EMBEDDED_IRCCLIENT)
|
||||
MESSAGE(STATUS "*** Using EMBEDDED libircclient since this system does not have it... IRCCLIENT_FOUND [${IRCCLIENT_FOUND}]")
|
||||
else()
|
||||
MESSAGE(STATUS "*** Using EMBEDDED libircclient because it was forced by option 'FORCE_USE_EMBEDDED_IRCCLIENT'")
|
||||
endif()
|
||||
SET(MG_SOURCE_FILES ${MG_SOURCE_FILES} ${PROJECT_SOURCE_DIR}/source/shared_lib/sources/libircclient/src/libircclient.c)
|
||||
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/source/shared_lib/include/libircclient/include)
|
||||
else()
|
||||
|
Reference in New Issue
Block a user