CMake: update new location of in-tree miniupnpc
This commit is contained in:
parent
0b6cd8d6d3
commit
2971e639b7
|
@ -39,13 +39,27 @@ find_package(Miniupnpc REQUIRED)
|
|||
|
||||
message(STATUS "Using in-tree miniupnpc")
|
||||
|
||||
add_subdirectory(miniupnp/miniupnpc)
|
||||
set(UPNP_STATIC false PARENT_SCOPE)
|
||||
set(UPNP_INCLUDE ${MINIUPNP_INCLUDE_DIR} PARENT_SCOPE)
|
||||
set(UPNP_LIBRARIES ${MINIUPNP_LIBRARY} PARENT_SCOPE)
|
||||
else()
|
||||
if(STATIC)
|
||||
message(STATUS "Using miniupnpc from local source tree for static build")
|
||||
else()
|
||||
message(STATUS "Using miniupnpc from local source tree (/external/miniupnp/miniupnpc)")
|
||||
endif()
|
||||
|
||||
set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
|
||||
if(MSVC)
|
||||
add_subdirectory(miniupnp/miniupnpc)
|
||||
|
||||
set_property(TARGET libminiupnpc-static PROPERTY FOLDER "external")
|
||||
if(MSVC)
|
||||
set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -wd4244 -wd4267")
|
||||
elseif(NOT MSVC)
|
||||
elseif(NOT MSVC)
|
||||
set_property(TARGET libminiupnpc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-undef -Wno-unused-result -Wno-unused-value")
|
||||
endif()
|
||||
|
||||
set(UPNP_STATIC true PARENT_SCOPE)
|
||||
set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
set(UPNP_LIBRARIES "libminiupnpc-static" PARENT_SCOPE)
|
||||
|
|
|
@ -49,9 +49,16 @@
|
|||
#include "storages/levin_abstract_invoke2.h"
|
||||
#include "cryptonote_core/cryptonote_core.h"
|
||||
|
||||
#include <miniupnp/miniupnpc/miniupnpc.h>
|
||||
#include <miniupnp/miniupnpc/upnpcommands.h>
|
||||
#include <miniupnp/miniupnpc/upnperrors.h>
|
||||
// We have to look for miniupnpc headers in different places, dependent on if its compiled or external
|
||||
#ifdef UPNP_STATIC
|
||||
#include <miniupnp/miniupnpc/miniupnpc.h>
|
||||
#include <miniupnp/miniupnpc/upnpcommands.h>
|
||||
#include <miniupnp/miniupnpc/upnperrors.h>
|
||||
#else
|
||||
#include "miniupnpc.h"
|
||||
#include "upnpcommands.h"
|
||||
#include "upnperrors.h"
|
||||
#endif
|
||||
|
||||
#undef MONERO_DEFAULT_LOG_CATEGORY
|
||||
#define MONERO_DEFAULT_LOG_CATEGORY "net.p2p"
|
||||
|
|
Loading…
Reference in New Issue