Commit 69b4ccc7 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Sébastien Blin

libarchive: speed up build on windows by avoiding cmake configure

The cmake configure for libarchive takes forever, so it's bypassed
by using a pregenerated config.h and .vcxproj. Should speed up the
contrib build on windows by roughly 5 to 7 min according to single
core performance.

Change-Id: Ibbe2eed2848a5af97e1166fb6b75984b2142d3da
parent 4337438d
......@@ -233,7 +233,8 @@ if(MSVC)
# Dependencies
################################################################################
set(libAdditionalDependencies "${CMAKE_STATIC_LINKER_FLAGS} /LTCG ws2_32.lib
set(libAdditionalDependencies "${CMAKE_STATIC_LINKER_FLAGS} /LTCG
ws2_32.lib
advapi32.lib
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avcodec.lib
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/ffmpeg/Build/win32/x64/bin/avdevice.lib
......@@ -251,7 +252,7 @@ if(MSVC)
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/portaudio.lib
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/libupnp.lib
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/natpmp/msvc/Release/natpmp.lib
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/libarchive/msvc/libarchive/Release/archive_static.lib
${CMAKE_CURRENT_SOURCE_DIR}/contrib/msvc/lib/x64/archive_static.lib
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsip-core-x86_64-x64-vc15-Release.lib
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsip-simple-x86_64-x64-vc15-Release.lib
${CMAKE_CURRENT_SOURCE_DIR}/contrib/build/pjproject/pjsip/lib/pjsua2-lib-x86_64-x64-vc15-Release.lib
......
This diff is collapsed.
From 261240c41e3011830eacc917587c98d40428ff4e Mon Sep 17 00:00:00 2001
From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>
Date: Thu, 20 Aug 2020 17:41:31 -0400
Subject: [PATCH] win vs2019
---
msvc/libarchive/archive_static.vcxproj | 240 +++++++++++++++++++++++++
1 file changed, 240 insertions(+)
create mode 100644 msvc/libarchive/archive_static.vcxproj
diff --git a/msvc/libarchive/archive_static.vcxproj b/msvc/libarchive/archive_static.vcxproj
new file mode 100644
index 0000000..f820489
--- /dev/null
+++ b/msvc/libarchive/archive_static.vcxproj
@@ -0,0 +1,240 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="16.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <PreferredToolArchitecture>x64</PreferredToolArchitecture>
+ </PropertyGroup>
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{EC42C425-F492-3C2E-8CF5-C02DBC0AE100}</ProjectGuid>
+ <WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
+ <Keyword>Win32Proj</Keyword>
+ <Platform>x64</Platform>
+ <ProjectName>archive_static</ProjectName>
+ <VCProjectUpgraderObjectName>NoUpgrade</VCProjectUpgraderObjectName>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>StaticLibrary</ConfigurationType>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v142</PlatformToolset>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup 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>
+ <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\..\msvc\lib\x64\</OutDir>
+ <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">archive_static.dir\Release\</IntDir>
+ <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|x64'">archive_static</TargetName>
+ <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.lib</TargetExt>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <AdditionalIncludeDirectories>..\..\libarchive;..\..\build;..\;..\..\..\..\msvc\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
+ <CompileAs>CompileAsC</CompileAs>
+ <ExceptionHandling>
+ </ExceptionHandling>
+ <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <Optimization>MaxSpeed</Optimization>
+ <PrecompiledHeader>NotUsing</PrecompiledHeader>
+ <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+ <UseFullPaths>false</UseFullPaths>
+ <WarningLevel>Level3</WarningLevel>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;LIBARCHIVE_STATIC;HAVE_CONFIG_H;_CRT_SECURE_NO_DEPRECATE;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <ObjectFileName>$(IntDir)</ObjectFileName>
+ <DebugInformationFormat>
+ </DebugInformationFormat>
+ <MultiProcessorCompilation>true</MultiProcessorCompilation>
+ </ClCompile>
+ <ResourceCompile>
+ <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;LIBARCHIVE_STATIC;HAVE_CONFIG_H;_CRT_SECURE_NO_DEPRECATE;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\libarchive;..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ </ResourceCompile>
+ <Midl>
+ <AdditionalIncludeDirectories>..\..\libarchive;..\..\build;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory>
+ <HeaderFileName>%(Filename).h</HeaderFileName>
+ <TypeLibraryName>%(Filename).tlb</TypeLibraryName>
+ <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName>
+ <ProxyFileName>%(Filename)_p.c</ProxyFileName>
+ </Midl>
+ <Lib>
+ <AdditionalOptions>%(AdditionalOptions) /machine:x64</AdditionalOptions>
+ </Lib>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <ClCompile Include="..\..\libarchive\archive_acl.c" />
+ <ClInclude Include="..\..\libarchive\archive_acl_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_check_magic.c" />
+ <ClCompile Include="..\..\libarchive\archive_cmdline.c" />
+ <ClInclude Include="..\..\libarchive\archive_cmdline_private.h" />
+ <ClInclude Include="..\..\libarchive\archive_crc32.h" />
+ <ClCompile Include="..\..\libarchive\archive_cryptor.c" />
+ <ClInclude Include="..\..\libarchive\archive_cryptor_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_digest.c" />
+ <ClInclude Include="..\..\libarchive\archive_digest_private.h" />
+ <ClInclude Include="..\..\libarchive\archive_endian.h" />
+ <ClCompile Include="..\..\libarchive\archive_entry.c" />
+ <ClInclude Include="..\..\libarchive\archive_entry.h" />
+ <ClCompile Include="..\..\libarchive\archive_entry_copy_stat.c" />
+ <ClCompile Include="..\..\libarchive\archive_entry_link_resolver.c" />
+ <ClInclude Include="..\..\libarchive\archive_entry_locale.h" />
+ <ClInclude Include="..\..\libarchive\archive_entry_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_entry_sparse.c" />
+ <ClCompile Include="..\..\libarchive\archive_entry_stat.c" />
+ <ClCompile Include="..\..\libarchive\archive_entry_strmode.c" />
+ <ClCompile Include="..\..\libarchive\archive_entry_xattr.c" />
+ <ClCompile Include="..\..\libarchive\archive_getdate.c" />
+ <ClInclude Include="..\..\libarchive\archive_getdate.h" />
+ <ClCompile Include="..\..\libarchive\archive_hmac.c" />
+ <ClInclude Include="..\..\libarchive\archive_hmac_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_match.c" />
+ <ClInclude Include="..\..\libarchive\archive_openssl_evp_private.h" />
+ <ClInclude Include="..\..\libarchive\archive_openssl_hmac_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_options.c" />
+ <ClInclude Include="..\..\libarchive\archive_options_private.h" />
+ <ClInclude Include="..\..\libarchive\archive_pack_dev.h" />
+ <ClCompile Include="..\..\libarchive\archive_pack_dev.c" />
+ <ClCompile Include="..\..\libarchive\archive_pathmatch.c" />
+ <ClInclude Include="..\..\libarchive\archive_pathmatch.h" />
+ <ClInclude Include="..\..\libarchive\archive_platform.h" />
+ <ClInclude Include="..\..\libarchive\archive_platform_acl.h" />
+ <ClInclude Include="..\..\libarchive\archive_platform_xattr.h" />
+ <ClInclude Include="..\..\libarchive\archive_ppmd_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_ppmd8.c" />
+ <ClInclude Include="..\..\libarchive\archive_ppmd8_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_ppmd7.c" />
+ <ClInclude Include="..\..\libarchive\archive_ppmd7_private.h" />
+ <ClInclude Include="..\..\libarchive\archive_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_random.c" />
+ <ClInclude Include="..\..\libarchive\archive_random_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_rb.c" />
+ <ClInclude Include="..\..\libarchive\archive_rb.h" />
+ <ClCompile Include="..\..\libarchive\archive_read.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_add_passphrase.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_append_filter.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_data_into_fd.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_disk_entry_from_file.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_disk_posix.c" />
+ <ClInclude Include="..\..\libarchive\archive_read_disk_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_read_disk_set_standard_lookup.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_extract.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_extract2.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_open_fd.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_open_file.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_open_filename.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_open_memory.c" />
+ <ClInclude Include="..\..\libarchive\archive_read_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_read_set_format.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_set_options.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_all.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_bzip2.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_compress.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_gzip.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_grzip.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_lrzip.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_lz4.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_lzop.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_none.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_program.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_rpm.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_uu.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_xz.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_filter_zstd.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_7zip.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_all.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_ar.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_by_code.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_cab.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_cpio.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_empty.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_iso9660.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_lha.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_mtree.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_rar.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_rar5.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_raw.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_tar.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_warc.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_xar.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_support_format_zip.c" />
+ <ClCompile Include="..\..\libarchive\archive_string.c" />
+ <ClInclude Include="..\..\libarchive\archive_string.h" />
+ <ClInclude Include="..\..\libarchive\archive_string_composition.h" />
+ <ClCompile Include="..\..\libarchive\archive_string_sprintf.c" />
+ <ClCompile Include="..\..\libarchive\archive_util.c" />
+ <ClCompile Include="..\..\libarchive\archive_version_details.c" />
+ <ClCompile Include="..\..\libarchive\archive_virtual.c" />
+ <ClCompile Include="..\..\libarchive\archive_write.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_disk_posix.c" />
+ <ClInclude Include="..\..\libarchive\archive_write_disk_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_write_disk_set_standard_lookup.c" />
+ <ClInclude Include="..\..\libarchive\archive_write_private.h" />
+ <ClCompile Include="..\..\libarchive\archive_write_open_fd.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_open_file.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_open_filename.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_open_memory.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_b64encode.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_by_name.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_bzip2.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_compress.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_grzip.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_gzip.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_lrzip.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_lz4.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_lzop.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_none.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_program.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_uuencode.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_xz.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_add_filter_zstd.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_7zip.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_ar.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_by_name.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_cpio.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_cpio_newc.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_filter_by_ext.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_gnutar.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_iso9660.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_mtree.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_pax.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_raw.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_shar.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_ustar.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_v7tar.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_warc.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_xar.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_format_zip.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_options.c" />
+ <ClCompile Include="..\..\libarchive\archive_write_set_passphrase.c" />
+ <ClInclude Include="..\..\libarchive\archive_xxhash.h" />
+ <ClCompile Include="..\..\libarchive\filter_fork_posix.c" />
+ <ClInclude Include="..\..\libarchive\filter_fork.h" />
+ <ClCompile Include="..\..\libarchive\xxhash.c" />
+ <ClCompile Include="..\..\libarchive\archive_entry_copy_bhfi.c" />
+ <ClCompile Include="..\..\libarchive\archive_read_disk_windows.c" />
+ <ClCompile Include="..\..\libarchive\archive_windows.c" />
+ <ClInclude Include="..\..\libarchive\archive_windows.h" />
+ <ClCompile Include="..\..\libarchive\archive_write_disk_windows.c" />
+ <ClCompile Include="..\..\libarchive\filter_fork_windows.c" />
+ <ClCompile Include="..\..\libarchive\archive_blake2sp_ref.c" />
+ <ClCompile Include="..\..\libarchive\archive_blake2s_ref.c" />
+ <ClInclude Include="..\..\libarchive\archive.h" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file
--
2.17.1
......@@ -2,15 +2,16 @@
"name": "libarchive",
"version": "a53d711261f4d5bf2104d9c3616a8602a45ba196",
"url": "https://github.com/libarchive/libarchive/archive/__VERSION__.tar.gz",
"deps": [],
"patches": [],
"deps": ["iconv"],
"patches": [
"0001-win-config.patch",
"0002-win-vs2019.patch"
],
"win_patches": [],
"project_paths": ["msvc/libarchive/archive_static.vcxproj"],
"with_env" : "",
"custom_scripts": {
"pre_build": [
"mkdir msvc & cd msvc & cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_LIBDIR=lib -DENABLE_TEST=OFF -DENABLE_TAR=OFF -DENABLE_CPIO=OFF -DENABLE_CAT=OFF -DENABLE_LIBXML2=OFF -G %CMAKE_GENERATOR%"
],
"pre_build": [],
"build": [],
"post_build": []
}
......
......@@ -21,7 +21,7 @@
"0001-win-config.patch",
"0002-win-vs-gnutls.patch",
"0003-win-vs2017-props.patch"
],
],
"project_paths": [
"pjlib-util/build/pjlib_util.vcxproj",
"pjmedia/build/pjmedia.vcxproj",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment