diff --git a/Source/Core/Common/CMakeLists.txt b/Source/Core/Common/CMakeLists.txt index 4f5c01e6a6..7d2950d570 100644 --- a/Source/Core/Common/CMakeLists.txt +++ b/Source/Core/Common/CMakeLists.txt @@ -119,6 +119,10 @@ endif() add_dolphin_library(common "${SRCS}" "${LIBS}") +if(OPROFILE_FOUND) + target_link_libraries(common PRIVATE ${OPROFILE_LIBRARIES}) +endif() + if(UNIX) # Posix networking code needs to be fixed for Windows add_executable(traversal_server TraversalServer.cpp) diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index 9fd579888b..96bbe1d15c 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -346,10 +346,6 @@ if(TARGET Hidapi::Hidapi) add_definitions(-DHAVE_HIDAPI=1) endif() -if(OPROFILE_FOUND) - set(LIBS ${LIBS} ${OPROFILE_LIBRARIES}) -endif() - if(GDBSTUB) set(SRCS ${SRCS} PowerPC/GDBStub.cpp) endif()