mirror of https://github.com/PCSX2/pcsx2.git
cmake: support `rapidyaml`
This commit is contained in:
parent
9533fa25c3
commit
4d4b24f8b0
2
build.sh
2
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"
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
|
@ -1369,7 +1369,7 @@ target_link_libraries(PCSX2_FLAGS INTERFACE
|
|||
common
|
||||
glad
|
||||
fmt::fmt
|
||||
yaml-cpp
|
||||
ryml
|
||||
chdr-static
|
||||
wxWidgets::all
|
||||
ZLIB::ZLIB
|
||||
|
|
Loading…
Reference in New Issue