Added USE_RETRO_ACHIEVEMENTS compiler flag

Added a flag to VS and CMake for enabling RetroAchievements integration.
This commit is contained in:
LillyJadeKatrin
2023-03-18 12:22:17 -04:00
parent 2836feac71
commit f3114b59f4
4 changed files with 16 additions and 3 deletions

View File

@ -602,7 +602,6 @@ PUBLIC
${MBEDTLS_LIBRARIES}
pugixml
RangeSet::RangeSet
rcheevos
sfml-network
sfml-system
videonull
@ -748,3 +747,8 @@ if(MSVC)
# Add precompiled header
target_link_libraries(core PRIVATE use_pch)
endif()
if(USE_RETRO_ACHIEVEMENTS)
target_link_libraries(core PRIVATE rcheevos)
target_compile_definitions(core PRIVATE -DUSE_RETRO_ACHIEVEMENTS)
endif()

View File

@ -686,4 +686,9 @@ endif()
if(USE_DISCORD_PRESENCE)
target_compile_definitions(dolphin-emu PRIVATE -DUSE_DISCORD_PRESENCE)
endif()
endif()
if(USE_RETRO_ACHIEVEMENTS)
target_link_libraries(dolphin-emu PRIVATE rcheevos)
target_compile_definitions(dolphin-emu PRIVATE -DUSE_RETRO_ACHIEVEMENTS)
endif()

View File

@ -45,6 +45,7 @@
<PreprocessorDefinitions Condition="'$(AutoUpdate)'!='false'">AUTOUPDATE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>HAVE_SDL2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Steam)'=='true'">STEAM;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_RETRO_ACHIEVEMENTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<!-- Warnings one may want to ignore when using Level4.
4201 nonstandard extension used : nameless struct/union