From a5ebb388a0bbf644edb1873f375ac6979bb5caa5 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 31 Mar 2023 22:36:24 +1000 Subject: [PATCH] CMake: Enable RAIntegration on Windows builds --- 3rdparty/rainterface/CMakeLists.txt | 10 ++++++++++ cmake/SearchForStuff.cmake | 3 +++ pcsx2/CMakeLists.txt | 9 +++++++++ 3 files changed, 22 insertions(+) create mode 100644 3rdparty/rainterface/CMakeLists.txt diff --git a/3rdparty/rainterface/CMakeLists.txt b/3rdparty/rainterface/CMakeLists.txt new file mode 100644 index 0000000000..bd142ac5a9 --- /dev/null +++ b/3rdparty/rainterface/CMakeLists.txt @@ -0,0 +1,10 @@ +add_library(rainterface + RA_Consoles.h + RA_Emulators.h + RA_Interface.cpp + RA_Interface.h +) + +target_include_directories(rainterface PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}") +target_include_directories(rainterface INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") + diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 6b8ddf5c32..f4d88a186b 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -154,6 +154,9 @@ if(QT_BUILD) # rcheevos backend for RetroAchievements. if(USE_ACHIEVEMENTS) add_subdirectory(3rdparty/rcheevos EXCLUDE_FROM_ALL) + if(WIN32) + add_subdirectory(3rdparty/rainterface EXCLUDE_FROM_ALL) + endif() endif() # Discord-RPC library for rich presence. diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index 55667c9828..3f0656ad60 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -884,6 +884,15 @@ if(USE_ACHIEVEMENTS) target_link_libraries(PCSX2_FLAGS INTERFACE rcheevos ) + if(WIN32) + # RAIntegration is only supported on Windows. + target_compile_definitions(PCSX2_FLAGS INTERFACE + ENABLE_RAINTEGRATION + ) + target_link_libraries(PCSX2_FLAGS INTERFACE + rainterface + ) + endif() endif() if(USE_DISCORD_PRESENCE) target_compile_definitions(PCSX2_FLAGS INTERFACE