diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d4fe3fa8a..ae86d33b42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,7 @@ option(USE_DISCORD_PRESENCE "Enables Discord Rich Presence, show the current gam option(USE_MGBA "Enables GBA controllers emulation using libmgba" ON) option(ENABLE_AUTOUPDATE "Enables support for automatic updates" ON) option(STEAM "Creates a build for Steam" OFF) +option(USE_RETRO_ACHIEVEMENTS "Enables integration with retroachievements.org" ON) # Maintainers: if you consider blanket disabling this for your users, please # consider the following points: @@ -975,7 +976,9 @@ add_subdirectory(Externals/rangeset) add_subdirectory(Externals/FatFs) -add_subdirectory(Externals/rcheevos) +if (USE_RETRO_ACHIEVEMENTS) + add_subdirectory(Externals/rcheevos) +endif() ######################################## # Pre-build events: Define configuration variables and write SCM info header diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index 9d699dbab1..08b8ffa9c7 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -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() \ No newline at end of file diff --git a/Source/Core/DolphinQt/CMakeLists.txt b/Source/Core/DolphinQt/CMakeLists.txt index e9d24bc4d1..184ce1db04 100644 --- a/Source/Core/DolphinQt/CMakeLists.txt +++ b/Source/Core/DolphinQt/CMakeLists.txt @@ -686,4 +686,9 @@ endif() if(USE_DISCORD_PRESENCE) target_compile_definitions(dolphin-emu PRIVATE -DUSE_DISCORD_PRESENCE) -endif() \ No newline at end of file +endif() + +if(USE_RETRO_ACHIEVEMENTS) + target_link_libraries(dolphin-emu PRIVATE rcheevos) + target_compile_definitions(dolphin-emu PRIVATE -DUSE_RETRO_ACHIEVEMENTS) +endif() diff --git a/Source/VSProps/Base.Dolphin.props b/Source/VSProps/Base.Dolphin.props index 15e3b0f072..6a9d0192d2 100644 --- a/Source/VSProps/Base.Dolphin.props +++ b/Source/VSProps/Base.Dolphin.props @@ -45,6 +45,7 @@ AUTOUPDATE;%(PreprocessorDefinitions) HAVE_SDL2;%(PreprocessorDefinitions) STEAM;%(PreprocessorDefinitions) + USE_RETRO_ACHIEVEMENTS;%(PreprocessorDefinitions)