mirror of https://github.com/PCSX2/pcsx2.git
Only search for yaml-cpp if asked to. (#3975)
This commit is contained in:
parent
7bcee22890
commit
99b8168ea8
2
build.sh
2
build.sh
|
@ -206,6 +206,7 @@ for ARG in "$@"; do
|
||||||
--strip ) flags="$flags -DCMAKE_BUILD_STRIP=TRUE" ;;
|
--strip ) flags="$flags -DCMAKE_BUILD_STRIP=TRUE" ;;
|
||||||
--sdl12 ) flags="$flags -DSDL2_API=FALSE" ;;
|
--sdl12 ) flags="$flags -DSDL2_API=FALSE" ;;
|
||||||
--extra ) flags="$flags -DEXTRA_PLUGINS=TRUE" ;;
|
--extra ) flags="$flags -DEXTRA_PLUGINS=TRUE" ;;
|
||||||
|
--use-system-yaml ) flags="$flags -DUSE_SYSTEM_YAML=TRUE" ;;
|
||||||
--asan ) flags="$flags -DUSE_ASAN=TRUE" ;;
|
--asan ) flags="$flags -DUSE_ASAN=TRUE" ;;
|
||||||
--gtk2 ) flags="$flags -DGTK2_API=TRUE" ;;
|
--gtk2 ) flags="$flags -DGTK2_API=TRUE" ;;
|
||||||
--lto ) flags="$flags -DUSE_LTO=TRUE" ;;
|
--lto ) flags="$flags -DUSE_LTO=TRUE" ;;
|
||||||
|
@ -240,6 +241,7 @@ for ARG in "$@"; do
|
||||||
echo "** Distribution Compatibilities **"
|
echo "** Distribution Compatibilities **"
|
||||||
echo "--sdl12 : Build with SDL1.2 (requires if wx is linked against SDL1.2)"
|
echo "--sdl12 : Build with SDL1.2 (requires if wx is linked against SDL1.2)"
|
||||||
echo "--no-portaudio : Skip portaudio for spu2x."
|
echo "--no-portaudio : Skip portaudio for spu2x."
|
||||||
|
echo "--use-system-yaml : Use the system version of yaml-cpp, if available."
|
||||||
echo
|
echo
|
||||||
echo "** Expert Developer option **"
|
echo "** Expert Developer option **"
|
||||||
echo "--gtk2 : use GTK 2 instead of GTK 3"
|
echo "--gtk2 : use GTK 2 instead of GTK 3"
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
option(DISABLE_BUILD_DATE "Disable including the binary compile date")
|
option(DISABLE_BUILD_DATE "Disable including the binary compile date")
|
||||||
option(ENABLE_TESTS "Enables building the unit tests" ON)
|
option(ENABLE_TESTS "Enables building the unit tests" ON)
|
||||||
|
option(USE_SYSTEM_YAML "Uses a system version of yaml, if found")
|
||||||
|
|
||||||
if(DISABLE_BUILD_DATE OR openSUSE)
|
if(DISABLE_BUILD_DATE OR openSUSE)
|
||||||
message(STATUS "Disabling the inclusion of the binary compile date.")
|
message(STATUS "Disabling the inclusion of the binary compile date.")
|
||||||
|
|
|
@ -269,15 +269,22 @@ else()
|
||||||
message(STATUS "Found fmt: ${fmt_VERSION}")
|
message(STATUS "Found fmt: ${fmt_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(yaml-cpp "0.6.3" QUIET)
|
if(USE_SYSTEM_YAML)
|
||||||
if(NOT yaml-cpp_FOUND)
|
find_package(yaml-cpp "0.6.3" QUIET)
|
||||||
|
if(NOT yaml-cpp_FOUND)
|
||||||
|
message(STATUS "No system yaml-cpp was found")
|
||||||
|
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.")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT USE_SYSTEM_YAML)
|
||||||
if(EXISTS "${CMAKE_SOURCE_DIR}/3rdparty/yaml-cpp/yaml-cpp/CMakeLists.txt")
|
if(EXISTS "${CMAKE_SOURCE_DIR}/3rdparty/yaml-cpp/yaml-cpp/CMakeLists.txt")
|
||||||
message(STATUS "No system yaml-cpp was found. Using bundled")
|
message(STATUS "Using bundled yaml-cpp")
|
||||||
add_subdirectory(3rdparty/yaml-cpp/yaml-cpp EXCLUDE_FROM_ALL)
|
add_subdirectory(3rdparty/yaml-cpp/yaml-cpp EXCLUDE_FROM_ALL)
|
||||||
else()
|
else()
|
||||||
message(FATAL_ERROR "No system or bundled yaml-cpp was found")
|
message(FATAL_ERROR "No bundled yaml-cpp was found")
|
||||||
endif()
|
endif()
|
||||||
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.")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue