From fc306faad839be2e9dc4f723f2c5fd59aec52f66 Mon Sep 17 00:00:00 2001 From: Michael M Date: Mon, 14 Aug 2017 15:13:49 -0700 Subject: [PATCH] CMake: use miniupnpc target instead of global vars --- CMakeLists.txt | 4 ---- Source/Core/Common/CMakeLists.txt | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 098caad8bb..a0cc27af12 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -670,12 +670,8 @@ if(USE_UPNP) else() message(STATUS "Using static miniupnpc from Externals") add_subdirectory(Externals/miniupnpc) - set(MINIUPNPC_INCLUDE_DIRS Externals/miniupnpc/src) - set(MINIUPNPC_LIBRARIES miniupnpc) endif() add_definitions(-DUSE_UPNP) - include_directories(${MINIUPNPC_INCLUDE_DIRS}) - list(APPEND LIBS ${MINIUPNPC_LIBRARIES}) endif() if(NOT APPLE) diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index 5019159b23..91eca8f2ae 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -120,6 +120,10 @@ endif() add_dolphin_library(common "${SRCS}" "${LIBS}") +if(USE_UPNP) + target_link_libraries(common PRIVATE Miniupnpc::miniupnpc) +endif() + if(OPROFILE_FOUND) target_link_libraries(common PRIVATE ${OPROFILE_LIBRARIES}) endif()