From 2836feac71ca45edd59619b11932747b57d5a0d0 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Sat, 11 Mar 2023 00:24:20 -0500 Subject: [PATCH] Added rcheevos to Externals Adds the rcheevos library from RetroAchievements to the Dolphin Externals as a submodule. Change was verified to import correctly and build both via Visual Studio and via cmake ninja. --- CMakeLists.txt | 2 + Externals/rcheevos/CMakeLists.txt | 49 +++++++++++++++++ Externals/rcheevos/exports.props | 13 +++++ Externals/rcheevos/rcheevos.vcxproj | 71 +++++++++++++++++++++++++ Source/Core/Core/CMakeLists.txt | 1 + Source/Core/DolphinLib.vcxproj | 1 + Source/Core/DolphinQt/DolphinQt.vcxproj | 1 + Source/dolphin-emu.sln | 11 ++++ 8 files changed, 149 insertions(+) create mode 100644 Externals/rcheevos/CMakeLists.txt create mode 100644 Externals/rcheevos/exports.props create mode 100644 Externals/rcheevos/rcheevos.vcxproj diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fd3972ad2..9d4fe3fa8a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -975,6 +975,8 @@ add_subdirectory(Externals/rangeset) add_subdirectory(Externals/FatFs) +add_subdirectory(Externals/rcheevos) + ######################################## # Pre-build events: Define configuration variables and write SCM info header # diff --git a/Externals/rcheevos/CMakeLists.txt b/Externals/rcheevos/CMakeLists.txt new file mode 100644 index 0000000000..0fea1f9873 --- /dev/null +++ b/Externals/rcheevos/CMakeLists.txt @@ -0,0 +1,49 @@ +add_library(rcheevos + rcheevos/include/rc_api_editor.h + rcheevos/include/rc_api_info.h + rcheevos/include/rc_api_request.h + rcheevos/include/rc_api_runtime.h + rcheevos/include/rc_api_user.h + rcheevos/include/rc_consoles.h + rcheevos/include/rc_error.h + rcheevos/include/rc_hash.h + rcheevos/include/rcheevos.h + rcheevos/include/rc_runtime.h + rcheevos/include/rc_runtime_types.h + rcheevos/include/rc_url.h + rcheevos/src/rapi/rc_api_common.c + rcheevos/src/rapi/rc_api_common.h + rcheevos/src/rapi/rc_api_editor.c + rcheevos/src/rapi/rc_api_info.c + rcheevos/src/rapi/rc_api_runtime.c + rcheevos/src/rapi/rc_api_user.c + rcheevos/src/rcheevos/alloc.c + rcheevos/src/rcheevos/compat.c + rcheevos/src/rcheevos/condition.c + rcheevos/src/rcheevos/condset.c + rcheevos/src/rcheevos/consoleinfo.c + rcheevos/src/rcheevos/format.c + rcheevos/src/rcheevos/lboard.c + rcheevos/src/rcheevos/memref.c + rcheevos/src/rcheevos/operand.c + rcheevos/src/rcheevos/rc_compat.h + rcheevos/src/rcheevos/rc_internal.h + rcheevos/src/rcheevos/rc_validate.c + rcheevos/src/rcheevos/rc_validate.h + rcheevos/src/rcheevos/richpresence.c + rcheevos/src/rcheevos/runtime.c + rcheevos/src/rcheevos/runtime_progress.c + rcheevos/src/rcheevos/trigger.c + rcheevos/src/rcheevos/value.c + rcheevos/src/rhash/hash.c + rcheevos/src/rhash/md5.c + rcheevos/src/rhash/md5.h + rcheevos/src/rurl/url.c +) + +target_include_directories(rcheevos PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/rcheevos/include") +target_include_directories(rcheevos INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}") +target_compile_definitions(rcheevos PRIVATE "RC_DISABLE_LUA=1" "RCHEEVOS_URL_SSL") +if(CMAKE_SYSTEM_NAME MATCHES "Windows") + target_compile_definitions(rcheevos PRIVATE "_CRT_SECURE_NO_WARNINGS") +endif() diff --git a/Externals/rcheevos/exports.props b/Externals/rcheevos/exports.props new file mode 100644 index 0000000000..d5e26ded5e --- /dev/null +++ b/Externals/rcheevos/exports.props @@ -0,0 +1,13 @@ + + + + + $(ExternalsDir)rcheevos;%(AdditionalIncludeDirectories) + + + + + {CC99A910-3752-4465-95AA-7DC240D92A99} + + + diff --git a/Externals/rcheevos/rcheevos.vcxproj b/Externals/rcheevos/rcheevos.vcxproj new file mode 100644 index 0000000000..cde8fd6ecd --- /dev/null +++ b/Externals/rcheevos/rcheevos.vcxproj @@ -0,0 +1,71 @@ + + + + + + {CC99A910-3752-4465-95AA-7DC240D92A99} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RC_DISABLE_LUA;RCHEEVOS_URL_SSL;%(PreprocessorDefinitions) + $(ProjectDir)rcheevos\include;%(AdditionalIncludeDirectories) + + + + + + \ No newline at end of file diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index 682c686c7d..9d699dbab1 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -602,6 +602,7 @@ PUBLIC ${MBEDTLS_LIBRARIES} pugixml RangeSet::RangeSet + rcheevos sfml-network sfml-system videonull diff --git a/Source/Core/DolphinLib.vcxproj b/Source/Core/DolphinLib.vcxproj index 5875de1550..827652cae7 100644 --- a/Source/Core/DolphinLib.vcxproj +++ b/Source/Core/DolphinLib.vcxproj @@ -52,6 +52,7 @@ + diff --git a/Source/Core/DolphinQt/DolphinQt.vcxproj b/Source/Core/DolphinQt/DolphinQt.vcxproj index 838e33d7a1..01280a46a9 100644 --- a/Source/Core/DolphinQt/DolphinQt.vcxproj +++ b/Source/Core/DolphinQt/DolphinQt.vcxproj @@ -436,6 +436,7 @@ + diff --git a/Source/dolphin-emu.sln b/Source/dolphin-emu.sln index eae84c8a7d..916bc2ec73 100644 --- a/Source/dolphin-emu.sln +++ b/Source/dolphin-emu.sln @@ -87,6 +87,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FatFs", "..\Externals\FatFs EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spng", "..\Externals\libspng\spng.vcxproj", "{447B7B1E-1D74-4AEF-B2B9-6EB41C5D5313}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcheevos", "..\Externals\rcheevos\rcheevos.vcxproj", "{CC99A910-3752-4465-95AA-7DC240D92A99}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|ARM64 = Debug|ARM64 @@ -419,6 +421,14 @@ Global {447B7B1E-1D74-4AEF-B2B9-6EB41C5D5313}.Release|ARM64.Build.0 = Release|ARM64 {447B7B1E-1D74-4AEF-B2B9-6EB41C5D5313}.Release|x64.ActiveCfg = Release|x64 {447B7B1E-1D74-4AEF-B2B9-6EB41C5D5313}.Release|x64.Build.0 = Release|x64 + {CC99A910-3752-4465-95AA-7DC240D92A99}.Debug|ARM64.ActiveCfg = Debug|ARM64 + {CC99A910-3752-4465-95AA-7DC240D92A99}.Debug|ARM64.Build.0 = Debug|ARM64 + {CC99A910-3752-4465-95AA-7DC240D92A99}.Debug|x64.ActiveCfg = Debug|x64 + {CC99A910-3752-4465-95AA-7DC240D92A99}.Debug|x64.Build.0 = Debug|x64 + {CC99A910-3752-4465-95AA-7DC240D92A99}.Release|ARM64.ActiveCfg = Release|ARM64 + {CC99A910-3752-4465-95AA-7DC240D92A99}.Release|ARM64.Build.0 = Release|ARM64 + {CC99A910-3752-4465-95AA-7DC240D92A99}.Release|x64.ActiveCfg = Release|x64 + {CC99A910-3752-4465-95AA-7DC240D92A99}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -455,6 +465,7 @@ Global {8DC244EE-A0BD-4038-BAF7-CFAFA5EB2BAA} = {87ADDFF9-5768-4DA2-A33B-2477593D6677} {3F17D282-A77D-4931-B844-903AD0809A5E} = {87ADDFF9-5768-4DA2-A33B-2477593D6677} {447B7B1E-1D74-4AEF-B2B9-6EB41C5D5313} = {87ADDFF9-5768-4DA2-A33B-2477593D6677} + {CC99A910-3752-4465-95AA-7DC240D92A99} = {87ADDFF9-5768-4DA2-A33B-2477593D6677} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {64B0A343-3B94-4522-9C24-6937FE5EFB22}