diff --git a/build.sh b/build.sh index 11d38f41c1..5ad2db3649 100755 --- a/build.sh +++ b/build.sh @@ -229,7 +229,7 @@ for ARG in "$@"; do echo "** Distribution Compatibilities **" echo "--sdl12 : Build with SDL1.2 (requires if wx is linked against SDL1.2)" echo "--no-portaudio : Skip portaudio for SPU2." - echo "--use-system-yaml : Use the system version of yaml-cpp, if available." + echo "--use-system-yaml : Use system rapidyaml library" echo echo "** Expert Developer option **" echo "--gtk2 : use GTK 2 instead of GTK 3" diff --git a/cmake/SearchForStuff.cmake b/cmake/SearchForStuff.cmake index 850c92575c..593c5facd5 100644 --- a/cmake/SearchForStuff.cmake +++ b/cmake/SearchForStuff.cmake @@ -229,26 +229,21 @@ else() endif() if(USE_SYSTEM_YAML) - find_package(yaml-cpp "0.6.3" QUIET) - if(NOT yaml-cpp_FOUND) - message(STATUS "No system yaml-cpp was found") + find_package(ryml REQUIRED) + if(NOT ryml_FOUND) + message(STATUS "No system rapidyaml was found, using the submodule in the 3rdparty directory") set(USE_SYSTEM_YAML OFF) else() - message(STATUS "Found yaml-cpp: ${yaml-cpp_VERSION}") - message(STATUS "Note that the latest release of yaml-cpp is very outdated, and the bundled submodule in the repo has over a year of bug fixes and as such is preferred.") + message(STATUS "Found rapidyaml: ${rapidyaml_VERSION}") endif() endif() if(NOT USE_SYSTEM_YAML) - if(EXISTS "${CMAKE_SOURCE_DIR}/3rdparty/yaml-cpp/yaml-cpp/CMakeLists.txt") - message(STATUS "Using bundled yaml-cpp") - add_subdirectory(3rdparty/yaml-cpp/yaml-cpp EXCLUDE_FROM_ALL) - if (NOT MSVC) - # Remove once https://github.com/jbeder/yaml-cpp/pull/815 is merged - target_compile_options(yaml-cpp PRIVATE -Wno-shadow) - endif() + if(EXISTS "${CMAKE_SOURCE_DIR}/3rdparty/rapidyaml/rapidyaml/CMakeLists.txt") + message(STATUS "Using bundled rapidyaml") + add_subdirectory(3rdparty/rapidyaml/rapidyaml EXCLUDE_FROM_ALL) else() - message(FATAL_ERROR "No bundled yaml-cpp was found") + message(FATAL_ERROR "No bundled rapidyaml was found") endif() endif() diff --git a/pcsx2/CMakeLists.txt b/pcsx2/CMakeLists.txt index f32b0a9b48..c20b457c9f 100644 --- a/pcsx2/CMakeLists.txt +++ b/pcsx2/CMakeLists.txt @@ -1369,7 +1369,7 @@ target_link_libraries(PCSX2_FLAGS INTERFACE common glad fmt::fmt - yaml-cpp + ryml chdr-static wxWidgets::all ZLIB::ZLIB