mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-02 21:11:25 +12:00
BUILD: Refactor wolfssl submodule (#10780)
This commit is contained in:
parent
9c0c8f2bc7
commit
ee6e4c493d
9 changed files with 173 additions and 168 deletions
50
3rdparty/wolfssl/CMakeLists.txt
vendored
Normal file
50
3rdparty/wolfssl/CMakeLists.txt
vendored
Normal file
|
@ -0,0 +1,50 @@
|
|||
if(USE_SYSTEM_WOLFSSL)
|
||||
message("-- RPCS3: using shared wolfssl")
|
||||
pkg_check_modules(WolfSSL REQUIRED IMPORTED_TARGET wolfssl>=4.7.0)
|
||||
add_library(wolfssl INTERFACE)
|
||||
target_link_libraries(wolfssl INTERFACE PkgConfig::WolfSSL)
|
||||
else()
|
||||
# TODO(cjj19970505@live.cn)
|
||||
# OPENSSL_EXTRA, WOLFSSL_DES_ECB and HAVE_SNI are unconfigurable from CMake cache.
|
||||
# but they do have it in a TODO list (wolfssl/CMakeList, 1021)
|
||||
add_compile_definitions(OPENSSL_EXTRA WOLFSSL_DES_ECB HAVE_SNI)
|
||||
|
||||
set(WOLFSSL_TLS13 "no" CACHE INTERNAL "")
|
||||
set(WOLFSSL_SHA224 "yes" CACHE INTERNAL "")
|
||||
set(WOLFSSL_SHA3 "yes" CACHE INTERNAL "")
|
||||
set(WOLFSSL_SHAKE256 "yes" CACHE INTERNAL "")
|
||||
set(WOLFSSL_BASE64_ENCODE "no" CACHE INTERNAL "")
|
||||
set(WOLFSSL_DES3 "yes" CACHE INTERNAL "")
|
||||
set(WOLFSSL_POLY1305 "yes" CACHE INTERNAL "")
|
||||
set(WOLFSSL_CHACHA "yes" CACHE INTERNAL "")
|
||||
set(WOLFSSL_FILESYSTEM "yes" CACHE INTERNAL "")
|
||||
set(WOLFSSL_PWDBASED "yes" CACHE INTERNAL "")
|
||||
set(WOLFSSL_FAST_MATH "no" CACHE INTERNAL "")
|
||||
set(WOLFSSL_EXAMPLES "no" CACHE INTERNAL "")
|
||||
set(WOLFSSL_CRYPT_TESTS "no" CACHE INTERNAL "")
|
||||
set(WOLFSSL_ASYNC_THREADS "no" CACHE INTERNAL "")
|
||||
set(WOLFSSL_CONFIG_H "no" CACHE INTERNAL "")
|
||||
|
||||
add_subdirectory(wolfssl EXCLUDE_FROM_ALL)
|
||||
|
||||
# TODO(cjj19970505@live.cn)
|
||||
# This only works in single-config generator
|
||||
# For a multi-config generator, we need to provide different wolfssl binaries for different config
|
||||
if (GENERATOR_IS_MULTI_CONFIG)
|
||||
message( FATAL_ERROR "RPCS3 can only be configured using single-config generator." )
|
||||
endif()
|
||||
|
||||
if(MSVC)
|
||||
set(WolfSSL_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/wolfssl/${CMAKE_BUILD_TYPE}/wolfssl.lib" CACHE INTERNAL "")
|
||||
else()
|
||||
set(WolfSSL_LIBRARY "${CMAKE_CURRENT_BINARY_DIR}/wolfssl/libwolfssl.a" CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
# "${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/wolfssl/" provides openssl headers
|
||||
# So that curl can be built on an environment where openssl headers are not provided
|
||||
set(WolfSSL_INCLUDE_DIR
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/wolfssl/wolfssl/"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/wolfssl/"
|
||||
CACHE INTERNAL "")
|
||||
endif()
|
0
3rdparty/wolfssl → 3rdparty/wolfssl/wolfssl
vendored
0
3rdparty/wolfssl → 3rdparty/wolfssl/wolfssl
vendored
165
3rdparty/wolfssl/wolfssl.vcxproj
vendored
Normal file
165
3rdparty/wolfssl/wolfssl.vcxproj
vendored
Normal file
|
@ -0,0 +1,165 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{73973223-5EE8-41CA-8E88-1D60E89A237B}</ProjectGuid>
|
||||
<RootNamespace>wolfssl</RootNamespace>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default.props" />
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<Import Project="$(SolutionDir)\buildfiles\msvc\common_default_macros.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<PropertyGroup>
|
||||
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
||||
</PropertyGroup>
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>$(SolutionDir)lib\$(Configuration)-$(Platform)\</OutDir>
|
||||
<IntDir>$(SolutionDir)tmp\$(ProjectName)-$(Configuration)-$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<AdditionalIncludeDirectories>./wolfssl;./wolfssl/IDE/WIN;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_DES_ECB;HAVE_FFDHE_2048;TFM_TIMING_RESISTANT;ECC_TIMING_RESISTANT;WC_RSA_BLINDING;HAVE_AESGCM;WOLFSSL_SHA512;WOLFSSL_SHA384;NO_DSA;HAVE_ECC;TFM_ECC256;ECC_SHAMIR;NO_RC4;NO_HC128;NO_RABBIT;WOLFSSL_SHA224;WOLFSSL_SHA3;WOLFSSL_SHAKE256;HAVE_POLY1305;HAVE_ONE_TIME_AUTH;HAVE_CHACHA;HAVE_HASHDRBG;HAVE_TLS_EXTENSIONS;HAVE_SNI;HAVE_SUPPORTED_CURVES;HAVE_EXTENDED_MASTER;NO_RC4;HAVE_ENCRYPT_THEN_MAC;NO_PSK;NO_MD4;WC_NO_ASYNC_THREADING;OPENSSL_EXTRA;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level4</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<DisableSpecificWarnings>4206;4214;4706;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<AdditionalIncludeDirectories>./wolfssl;./wolfssl/IDE/WIN;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>WOLFSSL_LIB;WOLFSSL_DES_ECB;HAVE_FFDHE_2048;TFM_TIMING_RESISTANT;NO_DSA;TFM_ECC256;NO_RC4;NO_HC128;NO_RABBIT;WOLFSSL_SHA224;WOLFSSL_SHA3;WOLFSSL_SHAKE256;HAVE_POLY1305;HAVE_ONE_TIME_AUTH;HAVE_CHACHA;HAVE_HASHDRBG;HAVE_SNI;HAVE_ENCRYPT_THEN_MAC;NO_MD4;WC_NO_ASYNC_THREADING;WOLFSSL_USER_SETTINGS;CYASSL_USER_SETTINGS;WC_NO_HARDEN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="wolfssl\src\crl.c" />
|
||||
<ClCompile Include="wolfssl\src\internal.c" />
|
||||
<ClCompile Include="wolfssl\src\wolfio.c" />
|
||||
<ClCompile Include="wolfssl\src\keys.c" />
|
||||
<ClCompile Include="wolfssl\src\ocsp.c" />
|
||||
<ClCompile Include="wolfssl\src\ssl.c" />
|
||||
<ClCompile Include="wolfssl\src\tls.c" />
|
||||
<ClCompile Include="wolfssl\src\tls13.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\aes.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\arc4.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\asn.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\blake2b.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\blake2s.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\camellia.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\chacha.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\chacha20_poly1305.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\cmac.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\coding.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\curve25519.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\cpuid.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\des3.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\dh.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\dsa.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\ecc.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\ed25519.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\error.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\fe_operations.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\ge_low_mem.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\ge_operations.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\hash.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\hc128.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\hmac.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\idea.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\integer.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\logging.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\md2.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\md4.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\md5.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\memory.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\pkcs7.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\pkcs12.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\poly1305.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\pwdbased.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\rabbit.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\random.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\ripemd.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\rsa.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\sha.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\sha256.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\sha3.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\sha512.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\signature.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\sp_c32.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\sp_c64.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\sp_int.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\sp_x86_64.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\srp.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\tfm.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\wc_encrypt.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\wc_pkcs11.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\wc_port.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\wolfmath.c" />
|
||||
<ClCompile Include="wolfssl\wolfcrypt\src\wolfevent.c" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="wolfssl\resource.h" />
|
||||
<CustomBuild Include="wolfssl\wolfcrypt\src\aes_asm.asm">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">false</ExcludedFromBuild>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">ml64.exe /c /Zi /Fo"$(OutDir)%(Filename).obj" %(Identity)</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">ml64.exe /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(OutDir)%(Filename).obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='DLL Debug|x64'">$(IntDir)%(Filename).obj</Outputs>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">false</ExcludedFromBuild>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">ml64.exe /c /Zi /Fo"$(OutDir)%(Filename).obj" %(Identity)</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">ml64.exe /c /Zi /Fo"$(IntDir)%(Filename).obj" %(Identity)</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(OutDir)%(Filename).obj</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='DLL Release|x64'">$(IntDir)%(Filename).obj</Outputs>
|
||||
</CustomBuild>
|
||||
<ClInclude Include="wolfssl\IDE\WIN\user_settings.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="wolfssl\wolfssl.rc">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
Loading…
Add table
Add a link
Reference in a new issue