mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
CMake: use miniupnpc target instead of global vars
This commit is contained in:
parent
26f5d500b9
commit
fc306faad8
@ -670,12 +670,8 @@ if(USE_UPNP)
|
|||||||
else()
|
else()
|
||||||
message(STATUS "Using static miniupnpc from Externals")
|
message(STATUS "Using static miniupnpc from Externals")
|
||||||
add_subdirectory(Externals/miniupnpc)
|
add_subdirectory(Externals/miniupnpc)
|
||||||
set(MINIUPNPC_INCLUDE_DIRS Externals/miniupnpc/src)
|
|
||||||
set(MINIUPNPC_LIBRARIES miniupnpc)
|
|
||||||
endif()
|
endif()
|
||||||
add_definitions(-DUSE_UPNP)
|
add_definitions(-DUSE_UPNP)
|
||||||
include_directories(${MINIUPNPC_INCLUDE_DIRS})
|
|
||||||
list(APPEND LIBS ${MINIUPNPC_LIBRARIES})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT APPLE)
|
if(NOT APPLE)
|
||||||
|
@ -120,6 +120,10 @@ endif()
|
|||||||
|
|
||||||
add_dolphin_library(common "${SRCS}" "${LIBS}")
|
add_dolphin_library(common "${SRCS}" "${LIBS}")
|
||||||
|
|
||||||
|
if(USE_UPNP)
|
||||||
|
target_link_libraries(common PRIVATE Miniupnpc::miniupnpc)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(OPROFILE_FOUND)
|
if(OPROFILE_FOUND)
|
||||||
target_link_libraries(common PRIVATE ${OPROFILE_LIBRARIES})
|
target_link_libraries(common PRIVATE ${OPROFILE_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user