CMake: Enable RAIntegration on Windows builds

This commit is contained in:
Stenzek 2023-03-31 22:36:24 +10:00 committed by refractionpcsx2
parent 9c91c700ac
commit a5ebb388a0
3 changed files with 22 additions and 0 deletions

10
3rdparty/rainterface/CMakeLists.txt vendored Normal file
View File

@ -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}")

View File

@ -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.

View File

@ -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