mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-22 02:32:36 +01:00
BUILD: Refactor zlib submodule (#10393)
This commit is contained in:
parent
f2d6b52561
commit
6c44664c19
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -28,7 +28,7 @@
|
|||||||
url = ../../RPCS3/cereal.git
|
url = ../../RPCS3/cereal.git
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
[submodule "3rdparty/zlib"]
|
[submodule "3rdparty/zlib"]
|
||||||
path = 3rdparty/zlib
|
path = 3rdparty/zlib/zlib
|
||||||
url = ../../madler/zlib
|
url = ../../madler/zlib
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
[submodule "3rdparty/hidapi"]
|
[submodule "3rdparty/hidapi"]
|
||||||
|
16
3rdparty/CMakeLists.txt
vendored
16
3rdparty/CMakeLists.txt
vendored
@ -7,21 +7,7 @@ add_library(3rdparty_dummy_lib INTERFACE)
|
|||||||
|
|
||||||
|
|
||||||
# ZLib
|
# ZLib
|
||||||
if (USE_SYSTEM_ZLIB)
|
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
||||||
find_package(ZLIB QUIET)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (NOT ZLIB_FOUND)
|
|
||||||
message(STATUS "Using builtin ZLIB")
|
|
||||||
set(SKIP_INSTALL_ALL ON)
|
|
||||||
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
|
||||||
set(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zlib" "${CMAKE_CURRENT_BINARY_DIR}/zlib")
|
|
||||||
set(ZLIB_LIBRARY zlibstatic)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(3rdparty_zlib INTERFACE)
|
|
||||||
target_link_libraries(3rdparty_zlib INTERFACE ${ZLIB_LIBRARY})
|
|
||||||
target_include_directories(3rdparty_zlib INTERFACE ${ZLIB_INCLUDE_DIR})
|
|
||||||
|
|
||||||
# 7z sdk
|
# 7z sdk
|
||||||
add_subdirectory(7z EXCLUDE_FROM_ALL)
|
add_subdirectory(7z EXCLUDE_FROM_ALL)
|
||||||
|
2
3rdparty/libpng/libpng.vcxproj
vendored
2
3rdparty/libpng/libpng.vcxproj
vendored
@ -15,7 +15,7 @@
|
|||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>libpng</RootNamespace>
|
<RootNamespace>libpng</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)\3rdparty\zlib.props" />
|
<Import Project="$(SolutionDir)\3rdparty\zlib\zlib.props" />
|
||||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
|
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_macros.props" />
|
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_macros.props" />
|
||||||
|
2
3rdparty/libpng/pnglibconf.vcxproj
vendored
2
3rdparty/libpng/pnglibconf.vcxproj
vendored
@ -19,7 +19,7 @@
|
|||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<CharacterSet>MultiByte</CharacterSet>
|
<CharacterSet>MultiByte</CharacterSet>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)\3rdparty\zlib.props" />
|
<Import Project="$(SolutionDir)\3rdparty\zlib\zlib.props" />
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||||
|
14
3rdparty/zlib/CMakeLists.txt
vendored
Normal file
14
3rdparty/zlib/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
if (USE_SYSTEM_ZLIB)
|
||||||
|
message(STATUS "-- RPCS3: Using syztem ZLIB")
|
||||||
|
find_package(ZLIB QUIET)
|
||||||
|
else()
|
||||||
|
message(STATUS "-- RPCS3: Using builtin ZLIB")
|
||||||
|
set(SKIP_INSTALL_ALL ON)
|
||||||
|
add_subdirectory(zlib EXCLUDE_FROM_ALL)
|
||||||
|
set(ZLIB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/zlib" "${CMAKE_CURRENT_BINARY_DIR}/zlib")
|
||||||
|
set(ZLIB_LIBRARY zlibstatic)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_library(3rdparty_zlib INTERFACE)
|
||||||
|
target_link_libraries(3rdparty_zlib INTERFACE ${ZLIB_LIBRARY})
|
||||||
|
target_include_directories(3rdparty_zlib INTERFACE ${ZLIB_INCLUDE_DIR})
|
0
3rdparty/zlib → 3rdparty/zlib/zlib
vendored
0
3rdparty/zlib → 3rdparty/zlib/zlib
vendored
@ -32,7 +32,7 @@
|
|||||||
versions do not match. The zlib version used in this build is recorded
|
versions do not match. The zlib version used in this build is recorded
|
||||||
below:
|
below:
|
||||||
-->
|
-->
|
||||||
<ZLibSrcDir>$(SolutionDir)3rdparty\zlib\</ZLibSrcDir>
|
<ZLibSrcDir>$(SolutionDir)3rdparty\zlib\zlib\</ZLibSrcDir>
|
||||||
|
|
||||||
<!-- The following line allows compilation for an ARM target with Visual
|
<!-- The following line allows compilation for an ARM target with Visual
|
||||||
Studio 2012. Notice that this is not supported by the Visual Studio
|
Studio 2012. Notice that this is not supported by the Visual Studio
|
@ -28,7 +28,7 @@
|
|||||||
<Keyword>Win32Proj</Keyword>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<RootNamespace>zlib</RootNamespace>
|
<RootNamespace>zlib</RootNamespace>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(SolutionDir)\3rdparty\zlib.props" />
|
<Import Project="$(SolutionDir)\3rdparty\zlib\zlib.props" />
|
||||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
|
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
@ -27,7 +27,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "3rdparty\libpng\l
|
|||||||
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35}
|
{EB33566E-DA7F-4D28-9077-88C0B7C77E35} = {EB33566E-DA7F-4D28-9077-88C0B7C77E35}
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "3rdparty\zlib.vcxproj", "{60F89955-91C6-3A36-8000-13C592FEC2DF}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "3rdparty\zlib\zlib.vcxproj", "{60F89955-91C6-3A36-8000-13C592FEC2DF}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glslang", "3rdparty\glslang\glslang.vcxproj", "{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glslang", "3rdparty\glslang\glslang.vcxproj", "{8F85B6CC-250F-4ACA-A617-E820A74E3E3C}"
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<ItemDefinitionGroup>
|
<ItemDefinitionGroup>
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>Use</PrecompiledHeader>
|
||||||
<AdditionalIncludeDirectories>..\3rdparty\wolfssl\;..\3rdparty\flatbuffers\include;..\3rdparty\libusb\libusb\libusb;..\3rdparty\zlib;..\llvm\include;..\llvm_build\include;$(VULKAN_SDK)\Include</AdditionalIncludeDirectories>
|
<AdditionalIncludeDirectories>..\3rdparty\wolfssl\;..\3rdparty\flatbuffers\include;..\3rdparty\libusb\libusb\libusb;..\3rdparty\zlib\zlib;..\llvm\include;..\llvm_build\include;$(VULKAN_SDK)\Include</AdditionalIncludeDirectories>
|
||||||
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
<Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<PreBuildEvent>
|
<PreBuildEvent>
|
||||||
|
@ -62,12 +62,12 @@
|
|||||||
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IgnoreImportLibrary>
|
<IgnoreImportLibrary Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</IgnoreImportLibrary>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
<IncludePath>..\3rdparty\7z\src;..\3rdparty\hidapi\hidapi\hidapi;.\;..\;..\3rdparty\asmjit\asmjit\src;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\include;..\3rdparty\cereal\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\XAudio2Redist\include;..\3rdparty\libpng\libpng;..\3rdparty\GL;..\3rdparty\stblib\include;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include;..\3rdparty\zlib</IncludePath>
|
<IncludePath>..\3rdparty\7z\src;..\3rdparty\hidapi\hidapi\hidapi;.\;..\;..\3rdparty\asmjit\asmjit\src;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\include;..\3rdparty\cereal\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\XAudio2Redist\include;..\3rdparty\libpng\libpng;..\3rdparty\GL;..\3rdparty\stblib\include;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include;..\3rdparty\zlib\zlib</IncludePath>
|
||||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
<LibraryPath>$(SolutionDir)lib\$(Configuration)-$(Platform)\;$(UniversalCRT_LibraryPath_x64);$(LibraryPath)</LibraryPath>
|
||||||
<IncludePath>..\3rdparty\7z\src;..\3rdparty\hidapi\hidapi\hidapi;.\;..\;..\3rdparty\asmjit\asmjit\src;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\include;..\3rdparty\cereal\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\XAudio2Redist\include;..\3rdparty\libpng\libpng;..\3rdparty\GL;..\3rdparty\stblib\include;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include;..\3rdparty\zlib</IncludePath>
|
<IncludePath>..\3rdparty\7z\src;..\3rdparty\hidapi\hidapi\hidapi;.\;..\;..\3rdparty\asmjit\asmjit\src;..\3rdparty\yaml-cpp\include;..\3rdparty\ffmpeg\include;..\3rdparty\cereal\include;$(VC_IncludePath);$(WindowsSDK_IncludePath);$(UniversalCRT_IncludePath);..\3rdparty\XAudio2Redist\include;..\3rdparty\libpng\libpng;..\3rdparty\GL;..\3rdparty\stblib\include;..\3rdparty\OpenAL\include;..\3rdparty\pugixml\src;..\3rdparty\Optional;..\3rdparty\discord-rpc\include;..\3rdparty\zlib\zlib</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
|
Loading…
Reference in New Issue
Block a user