Add UPnP support.
Feedback is in logs as suggested by skid_au. The checkbox is still there, but mostly for people who would like to opt out (unfortunately, I can not be sure how this feature may behave for some routers - there's a hell of a lot of bad UPnP implementations.) The Visual Studio stuff is a little messy, so I apologize if anything is a bit off. I tested most configurations and it worked. I also tested CMake on Debian Wheezy, Ubuntu Saucy, and Mac OS X Mountain Lion. All seemed to be OK.
This commit is contained in:
@@ -9,6 +9,7 @@ option(USE_X11 "Enables X11 Support" ON)
|
||||
option(USE_WAYLAND "Enables Wayland Support" OFF)
|
||||
option(USE_GLES "Enables GLES2 And EGL, disables OGL" OFF)
|
||||
option(USE_GLES3 "Enables GLES3 and EGL" OFF)
|
||||
option(USE_UPNP "Enables UPnP port mapping support" ON)
|
||||
option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF)
|
||||
|
||||
option(FASTLOG "Enable all logs" OFF)
|
||||
@@ -549,6 +550,13 @@ else()
|
||||
include_directories(Externals/SFML/include)
|
||||
endif()
|
||||
|
||||
if(USE_UPNP)
|
||||
message("Using static MiniUPnP client from Externals")
|
||||
add_subdirectory(Externals/miniupnpc)
|
||||
include_directories(Externals/miniupnpc/src)
|
||||
add_definitions(-DUSE_UPNP)
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
|
||||
check_lib(SOIL SOIL SOIL/SOIL.h QUIET)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user