mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Use system headers when building with system miniupnpc
Fixes https://github.com/hrydgard/ppsspp/pull/15185
This commit is contained in:
parent
3e5511b609
commit
17171bc9dc
@ -2050,6 +2050,7 @@ if(USE_MINIUPNPC)
|
||||
find_package(MINIUPNPC REQUIRED)
|
||||
target_include_directories(${CoreLibName} PRIVATE ${MINIUPNP_INCLUDE_DIR})
|
||||
target_link_libraries(${CoreLibName} ${MINIUPNP_LIBRARY})
|
||||
add_definitions(-DWITH_UPNP -DUSE_SYSTEM_MINIUPNPC)
|
||||
else()
|
||||
set (MINIUPNPC_VERSION 2.1) # used by miniupnpcstrings.h.cmake
|
||||
set (MINIUPNPC_API_VERSION 17)
|
||||
@ -2068,7 +2069,7 @@ if(USE_MINIUPNPC)
|
||||
add_definitions (-D_DARWIN_C_SOURCE)
|
||||
endif()
|
||||
if(WIN32)
|
||||
add_definitions(-DWIN32 -DMINIUPNP_EXPORTS )
|
||||
add_definitions(-DWIN32 -DMINIUPNP_EXPORTS)
|
||||
else()
|
||||
add_definitions(-fPIC)
|
||||
endif()
|
||||
|
@ -21,14 +21,18 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#ifdef USE_SYSTEM_MINIUPNPC
|
||||
#include <miniupnpc/miniwget.h>
|
||||
#include <miniupnpc/miniupnpc.h>
|
||||
#include <miniupnpc/upnpcommands.h>
|
||||
#else
|
||||
#ifndef MINIUPNP_STATICLIB
|
||||
#define MINIUPNP_STATICLIB
|
||||
#endif
|
||||
|
||||
#include "ext/miniupnp/miniupnpc/miniwget.h"
|
||||
#include "ext/miniupnp/miniupnpc/miniupnpc.h"
|
||||
#include "ext/miniupnp/miniupnpc/upnpcommands.h"
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <deque>
|
||||
|
Loading…
Reference in New Issue
Block a user