mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
Fix UPnP for Win32
* find_package for headers * Swap includes order to pass compilation with MSVC 2013 * Enforce SO address resolution checks * Change SO/DLL name on Windows * Portable sleep from C++11 This closes #186
This commit is contained in:
parent
d7e7823606
commit
046ffd8648
4 changed files with 100 additions and 84 deletions
25
build/cmake_modules/FindMiniUPnPc.cmake
Normal file
25
build/cmake_modules/FindMiniUPnPc.cmake
Normal file
|
@ -0,0 +1,25 @@
|
|||
# - Find MINIUPNPC
|
||||
|
||||
if(MINIUPNPC_INCLUDE_DIR)
|
||||
set(MINIUPNPC_FOUND TRUE)
|
||||
|
||||
else()
|
||||
find_path(MINIUPNPC_INCLUDE_DIR miniupnpc.h
|
||||
/usr/include/miniupnpc
|
||||
/usr/local/include/miniupnpc
|
||||
/opt/local/include/miniupnpc
|
||||
$ENV{SystemDrive}/miniupnpc
|
||||
${PROJECT_SOURCE_DIR}/../../miniupnpc
|
||||
)
|
||||
|
||||
if(MINIUPNPC_INCLUDE_DIR)
|
||||
set(MINIUPNPC_FOUND TRUE)
|
||||
message(STATUS "Found MiniUPnP headers: ${MINIUPNPC_INCLUDE_DIR}")
|
||||
else()
|
||||
set(MINIUPNPC_FOUND FALSE)
|
||||
message(STATUS "MiniUPnP not found.")
|
||||
endif()
|
||||
|
||||
mark_as_advanced(MINIUPNPC_INCLUDE_DIR)
|
||||
|
||||
endif()
|
Loading…
Add table
Add a link
Reference in a new issue