From 14dc1fead63a844b00a6ac2cf1b7b230465d58dd Mon Sep 17 00:00:00 2001 From: scribam Date: Sat, 24 Mar 2018 22:16:05 +0100 Subject: [PATCH] yaml-cpp: update submodule and build integration --- .gitmodules | 6 +++--- .travis.yml | 2 +- 3rdparty/yaml-cpp | 1 + {Utilities => 3rdparty}/yaml-cpp.vcxproj | 0 {Utilities => 3rdparty}/yaml-cpp.vcxproj.filters | 0 CMakeLists.txt | 5 +++++ Utilities/bin_patch.cpp | 2 +- Utilities/yaml-cpp | 1 - appveyor.yml | 10 +++++----- rpcs3.sln | 2 +- rpcs3/CMakeLists.txt | 3 +-- rpcs3/Emu/System.cpp | 2 +- rpcs3/emucore.vcxproj | 4 ++-- rpcs3/rpcs3.vcxproj | 8 ++++---- rpcs3_default.props | 2 +- 15 files changed, 26 insertions(+), 22 deletions(-) create mode 160000 3rdparty/yaml-cpp rename {Utilities => 3rdparty}/yaml-cpp.vcxproj (100%) rename {Utilities => 3rdparty}/yaml-cpp.vcxproj.filters (100%) delete mode 160000 Utilities/yaml-cpp diff --git a/.gitmodules b/.gitmodules index 32617ad560..7499938218 100644 --- a/.gitmodules +++ b/.gitmodules @@ -19,9 +19,6 @@ [submodule "Vulkan/glslang"] path = Vulkan/glslang url = https://github.com/KhronosGroup/glslang.git -[submodule "Utilities/yaml-cpp"] - path = Utilities/yaml-cpp - url = https://github.com/RPCS3/yaml-cpp [submodule "3rdparty/cereal"] path = 3rdparty/cereal url = https://github.com/USCiLab/cereal.git @@ -42,3 +39,6 @@ [submodule "3rdparty/xxHash"] path = 3rdparty/xxHash url = https://github.com/Cyan4973/xxHash +[submodule "3rdparty/yaml-cpp"] + path = 3rdparty/yaml-cpp + url = https://github.com/jbeder/yaml-cpp.git diff --git a/.travis.yml b/.travis.yml index 61231a4312..091304d328 100644 --- a/.travis.yml +++ b/.travis.yml @@ -55,7 +55,7 @@ install: fi; before_script: - - git submodule update --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng Utilities/yaml-cpp 3rdparty/cereal 3rdparty/hidapi 3rdparty/Optional 3rdparty/xxHash Vulkan/glslang + - git submodule update --init asmjit 3rdparty/ffmpeg 3rdparty/pugixml 3rdparty/GSL 3rdparty/libpng 3rdparty/cereal 3rdparty/hidapi 3rdparty/Optional 3rdparty/xxHash 3rdparty/yaml-cpp Vulkan/glslang - mkdir build ; cd build - if [ "$TRAVIS_PULL_REQUEST" = false ]; then export CXXFLAGS="$CXXFLAGS -DBRANCH=$TRAVIS_REPO_SLUG/$TRAVIS_BRANCH"; diff --git a/3rdparty/yaml-cpp b/3rdparty/yaml-cpp new file mode 160000 index 0000000000..4fb1c4b92b --- /dev/null +++ b/3rdparty/yaml-cpp @@ -0,0 +1 @@ +Subproject commit 4fb1c4b92bf8d94b32ebccdd890407d45b3bc794 diff --git a/Utilities/yaml-cpp.vcxproj b/3rdparty/yaml-cpp.vcxproj similarity index 100% rename from Utilities/yaml-cpp.vcxproj rename to 3rdparty/yaml-cpp.vcxproj diff --git a/Utilities/yaml-cpp.vcxproj.filters b/3rdparty/yaml-cpp.vcxproj.filters similarity index 100% rename from Utilities/yaml-cpp.vcxproj.filters rename to 3rdparty/yaml-cpp.vcxproj.filters diff --git a/CMakeLists.txt b/CMakeLists.txt index 66b86f5f27..7dfe005efb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,6 +55,11 @@ else() #list(APPEND LIBS hidapi-libusb) endif() +set(YAML_CPP_BUILD_TESTS OFF CACHE BOOL "Enable testing" FORCE) +set(YAML_CPP_BUILD_TOOLS OFF CACHE BOOL "Enable parse tools" FORCE) +set(YAML_CPP_BUILD_CONTRIB OFF CACHE BOOL "Enable contrib stuff in library" FORCE) +add_subdirectory(3rdparty/yaml-cpp EXCLUDE_FROM_ALL) + set(XXHASH_BUNDLED_MODE ON) set(BUILD_SHARED_LIBS OFF CACHE BOOL "Make xxHash build static libs") add_subdirectory(3rdparty/xxHash/cmake_unofficial) diff --git a/Utilities/bin_patch.cpp b/Utilities/bin_patch.cpp index f8fe60bdb5..926620645a 100644 --- a/Utilities/bin_patch.cpp +++ b/Utilities/bin_patch.cpp @@ -1,5 +1,5 @@ #include "bin_patch.h" -#include "yaml-cpp/yaml.h" +#include #include "File.h" #include "Config.h" diff --git a/Utilities/yaml-cpp b/Utilities/yaml-cpp deleted file mode 160000 index 017626a6ce..0000000000 --- a/Utilities/yaml-cpp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 017626a6cef0efb13b15ed659c86b8da2d2d81bc diff --git a/appveyor.yml b/appveyor.yml index e3372c19e1..400d090558 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -52,9 +52,9 @@ install: 3rdparty/Optional ` 3rdparty/pugixml ` 3rdparty/xxHash ` + 3rdparty/yaml-cpp ` 3rdparty/zlib ` asmjit ` - Utilities/yaml-cpp ` Vulkan/glslang platform: x64 @@ -77,16 +77,16 @@ before_build: if (!(test-path glslang.7z)) { irm $env:GLSLANG -outfile glslang.7z } 7z x llvmlibs.7z -aos -o"." | out-null 7z x glslang.7z -aos -o".\lib\$env:CONFIGURATION-$env:PLATFORM" | out-null - if (!(test-path vulkan-sdk.exe)) + if (!(test-path vulkan-sdk.exe)) { foreach ($url in $VULKAN_SDK_URLS) { - irm $url -outfile vulkan-sdk.exe - if ($env:VULKAN_SDK_SHA -eq $(Get-FileHash .\vulkan-sdk.exe).Hash) + irm $url -outfile vulkan-sdk.exe + if ($env:VULKAN_SDK_SHA -eq $(Get-FileHash .\vulkan-sdk.exe).Hash) { echo "Successfully downloaded and verified vulkan-sdk.exe!" break } - else + else { echo "Invalid file hash, Vulkan SDK Setup was possibly tampered with, retrying with a different mirror..." } diff --git a/rpcs3.sln b/rpcs3.sln index 2a1c02d01d..e2b4ba0796 100644 --- a/rpcs3.sln +++ b/rpcs3.sln @@ -45,7 +45,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "yaml-cpp", "yaml-cpp", "{DD EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "__BUILD_BEFORE", "__BUILD_BEFORE", "{B0AC29FD-7B01-4B5E-9C8D-0A081E4C5668}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml-cpp", "Utilities\yaml-cpp.vcxproj", "{FDC361C5-7734-493B-8CFB-037308B35122}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "yaml-cpp", "3rdparty\yaml-cpp.vcxproj", "{FDC361C5-7734-493B-8CFB-037308B35122}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rpcs3", "rpcs3\rpcs3.vcxproj", "{70CD65B0-91D6-4FAE-9A7B-4AF55D0D1B12}" ProjectSection(ProjectDependencies) = postProject diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index e700722283..ba0a672d60 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -294,7 +294,6 @@ ${LLVM_INCLUDE_DIRS} "${RPCS3_SRC_DIR}/Loader" "${RPCS3_SRC_DIR}/Crypto" "${RPCS3_SRC_DIR}/.." -"${RPCS3_SRC_DIR}/../Utilities/yaml-cpp/include" "${RPCS3_SRC_DIR}/../asmjit/src/asmjit" "${RPCS3_SRC_DIR}/../3rdparty/GSL/include" "${RPCS3_SRC_DIR}/../3rdparty/hidapi/hidapi" @@ -400,7 +399,7 @@ if(VULKAN_FOUND) target_link_libraries(rpcs3 SPIRV Vulkan::Vulkan) endif() -target_link_libraries(rpcs3 xxhash) +target_link_libraries(rpcs3 xxhash yaml-cpp) if(WIN32) target_link_libraries(rpcs3 ws2_32.lib Winmm.lib Psapi.lib gdi32.lib setupapi.lib hidapi-hid Shlwapi.lib) diff --git a/rpcs3/Emu/System.cpp b/rpcs3/Emu/System.cpp index fbc3b02d30..5f6b09c3f4 100644 --- a/rpcs3/Emu/System.cpp +++ b/rpcs3/Emu/System.cpp @@ -26,7 +26,7 @@ #include "../Crypto/unself.h" #include "../Crypto/unpkg.h" -#include "yaml-cpp/yaml.h" +#include #include "cereal/archives/binary.hpp" diff --git a/rpcs3/emucore.vcxproj b/rpcs3/emucore.vcxproj index 248199a4dc..37d8eede3c 100644 --- a/rpcs3/emucore.vcxproj +++ b/rpcs3/emucore.vcxproj @@ -425,7 +425,7 @@ - + @@ -587,7 +587,7 @@ {ac40ff01-426e-4838-a317-66354cefae88} - + {fdc361c5-7734-493b-8cfb-037308b35122} diff --git a/rpcs3/rpcs3.vcxproj b/rpcs3/rpcs3.vcxproj index 8592927199..f1b696b583 100644 --- a/rpcs3/rpcs3.vcxproj +++ b/rpcs3/rpcs3.vcxproj @@ -107,20 +107,20 @@ true - ..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include + ..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include $(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) - ..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include + ..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include $(SolutionDir)lib\Debug-x64;$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) $(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) - ..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include + ..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include $(SolutionDir)lib\Release-x64;$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) - ..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include + ..\3rdparty\hidapi\hidapi;.\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include diff --git a/rpcs3_default.props b/rpcs3_default.props index 3dbcf77a13..dad544a022 100644 --- a/rpcs3_default.props +++ b/rpcs3_default.props @@ -3,7 +3,7 @@ - .\;..\;..\asmjit\src\asmjit;..\Utilities\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\hidapi\hidapi;..\3rdparty\Optional;..\3rdparty\xxhash + .\;..\;..\asmjit\src\asmjit;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\WindowsInclude;..\3rdparty\cereal\include;..\3rdparty\ffmpeg\Windows\x86_64\Include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\minidx12\Include;..\3rdparty\GSL\include;..\3rdparty\libpng;..\3rdparty\GL;..\3rdparty\stblib;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\hidapi\hidapi;..\3rdparty\Optional;..\3rdparty\xxhash $(SolutionDir)lib\$(Configuration)-$(Platform)\ $(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath) $(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\