Changeset 2476
- Timestamp:
- 04/01/08 22:00:36 (9 months ago)
- Location:
- vidalia/trunk
- Files:
-
- 1 added
- 4 modified
-
CMakeLists.txt (modified) (1 diff)
-
cmake/FindMiniUPnPc.cmake (added)
-
config.h.in (modified) (1 diff)
-
src/vidalia/CMakeLists.txt (modified) (4 diffs)
-
src/vidalia/config/serversettings.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vidalia/trunk/CMakeLists.txt
r2464 r2476 63 63 endif(USE_QSSLSOCKET) 64 64 65 ## UPnP support is currently optional (disabled by default) 66 option(USE_MINIUPNPC "Enable UPnP support using the MiniUPnPc library." OFF) 67 if (USE_MINIUPNPC) 68 include(${CMAKE_SOURCE_DIR}/cmake/FindMiniUPnPc.cmake) 69 endif(USE_MINIUPNPC) 70 65 71 ## Check for system header files 66 72 check_include_file("limits.h" HAVE_LIMITS_H) -
vidalia/trunk/config.h.in
r2446 r2476 27 27 #cmakedefine SIZEOF_INT @SIZEOF_INT@ 28 28 29 #cmakedefine HAVE_MINIUPNPC_H 30 31 #cmakedefine USE_MINIUPNPC 32 29 33 #endif 30 34 -
vidalia/trunk/src/vidalia/CMakeLists.txt
r2475 r2476 17 17 ${CMAKE_CURRENT_SOURCE_DIR}/config 18 18 ${CMAKE_CURRENT_SOURCE_DIR}/help/browser 19 ${MINIUPNPC_INCLUDE_DIR}20 19 ) 21 20 configure_file( … … 63 62 config/serverpage.cpp 64 63 config/serversettings.cpp 65 config/upnpcontrol.cpp66 64 config/torsettings.cpp 67 65 config/vidaliasettings.cpp … … 83 81 config/serverpage.h 84 82 config/serversettings.h 85 config/upnpcontrol.h86 83 config/torsettings.h 87 84 config/vidaliasettings.h 88 85 config/vsettings.h 89 86 ) 87 if (USE_MINIUPNPC) 88 include_directories(${MINIUPNPC_INCLUDE_DIR}) 89 set(vidalia_SRCS ${vidalia_SRCS} 90 config/upnpcontrol.cpp 91 ) 92 qt4_wrap_cpp(vidalia_SRCS 93 config/upnpcontrol.h 94 ) 95 endif(USE_MINIUPNPC) 90 96 91 97 ## Help browser sources … … 238 244 add_dependencies(${vidalia_BIN} translations) 239 245 240 ## Link in miniupnpc241 find_library(MINIUPNPC242 NAMES miniupnpc243 PATHS ${MINIUPNPC_LIBRARY_DIR}244 )245 246 246 247 ## Link to the Qt libraries and other libraries built as a part of Vidalia 247 248 target_link_libraries(${vidalia_BIN} 248 249 ${QT_LIBRARIES} 249 ${MINIUPNPC}250 250 torcontrol 251 251 util 252 252 ) 253 if (USE_MINIUPNPC) 254 target_link_libraries(${vidalia_BIN} ${MINIUPNPC_LIBRARY}) 255 endif(USE_MINIUPNPC) 256 253 257 if (MINGW) 254 258 target_link_libraries(${vidalia_BIN} -
vidalia/trunk/src/vidalia/config/serversettings.cpp
r2475 r2476 18 18 #include <net.h> 19 19 #include <stringutil.h> 20 #include <config.h> 20 21 21 22 #include "serversettings.h" 22 23 #include "torsettings.h" 24 25 #ifdef USE_MINIUPNPC 23 26 #include "upnpcontrol.h" 27 #endif 24 28 25 29 /** Define the set of characters that are valid in a nickname. */ … … 164 168 ServerSettings::configurePortForwarding() 165 169 { 170 #ifdef USE_MINIUPNPC 166 171 UPNPControl *pUNPControl = UPNPControl::Instance(); 167 172 pUNPControl->forwardPort(getORPort()); 173 #endif 168 174 } 169 175
