-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-19: Replaced
libcurl-devel
with vcpkg ports
Added `brotli` and `zstd` as additional compression engines
- Loading branch information
Showing
65 changed files
with
2,278 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<Project> | ||
<Import Project="$(MSBuildThisFileDirectory)User.props" Condition="Exists('$(MSBuildThisFileDirectory)User.props')"/> | ||
|
||
<PropertyGroup> | ||
<VcpkgTriplet Condition="'$(VcpkgTriplet)'=='' And '$(Platform)'=='Win32'">x86-windows-static</VcpkgTriplet> | ||
<VcpkgTriplet Condition="'$(VcpkgTriplet)'=='' And '$(Platform)'=='x64'">x64-windows-static</VcpkgTriplet> | ||
<VcpkgRootDir Condition="'$(VcpkgRootDir)'==''">$(SolutionDir)vcpkg\$(VcpkgTriplet)\</VcpkgRootDir> | ||
<VcpkgInstalledDir Condition="'$(VcpkgInstalledDir)'==''">$(VcpkgRootDir)installed\$(VcpkgTriplet)\</VcpkgInstalledDir> | ||
</PropertyGroup> | ||
|
||
<ItemDefinitionGroup Condition="$(MSBuildProjectExtension) == '.vcxproj'"> | ||
<ClCompile> | ||
<AdditionalIncludeDirectories>$(VcpkgInstalledDir)include;$(VcpkgInstalledDir)include\openssl;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
|
||
<ItemDefinitionGroup Condition="$(Configuration.Contains('Debug')) and '$(MSBuildProjectExtension)' == '.vcxproj'"> | ||
<Link> | ||
<AdditionalLibraryDirectories>$(VcpkgInstalledDir)debug\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
|
||
<ItemDefinitionGroup Condition="$(Configuration.Contains('Release')) and '$(MSBuildProjectExtension)' == '.vcxproj'"> | ||
<Link> | ||
<AdditionalLibraryDirectories>$(VcpkgInstalledDir)lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
REM | marius.negrutiu@protonmail.com | ||
@echo off | ||
setlocal EnableDelayedExpansion | ||
|
||
REM | script.bat <Win32|x64|arm64> <msvc|mingw> <static|dynamic> | ||
set arch=%~1 | ||
set compiler=%~2 | ||
set runtime=%~3 | ||
set vcpkg_dir= | ||
set vcpkg_triplet= | ||
|
||
if /i "%arch%" equ "" set arch=x86 | ||
if /i "%arch%" equ "Win32" set arch=x86 | ||
echo _x86_x64_arm64_ | findstr /I "_%arch%_" > nul | ||
if %errorlevel% neq 0 echo ERROR: Unexpected architecture. Use Win32^|x64^|arm64&& exit /b -57 | ||
|
||
if "%compiler%" equ "" set compiler=mingw | ||
echo _msvc_mingw_ | findstr /I "_%compiler%_" > nul | ||
if %errorlevel% neq 0 echo ERROR: Unexpected compiler. Use msvc^|mingw&& exit /b -57 | ||
|
||
if "%runtime%" equ "" set runtime=static | ||
echo _static_dynamic_ | findstr /I "_%runtime%_" > nul | ||
if %errorlevel% neq 0 echo ERROR: Unexpected linkage type. Use static^|dynamic&& exit /b -57 | ||
|
||
if /i "%compiler%" equ "mingw" set vcpkg_triplet=%arch%-mingw-%runtime% | ||
if /i "%compiler%" equ "msvc" if /i "%runtime%" equ "static" set vcpkg_triplet=%arch%-windows-%runtime% | ||
if /i "%compiler%" equ "msvc" if /i "%runtime%" equ "dynamic" set vcpkg_triplet=%arch%-windows | ||
|
||
set vcpkg_dir=%~dp0vcpkg\%vcpkg_triplet% | ||
|
||
title vcpkg -^> %vcpkg_triplet% | ||
|
||
REM | ------------------------------------------------------------------------- | ||
|
||
if /i "%compiler%" equ "mingw" if /i "%arch%" equ "x64" if exist "%SystemDrive%\msys64\mingw64\bin" set PATH=%SystemDrive%\msys64\mingw64\bin;%PATH% | ||
if /i "%compiler%" equ "mingw" if /i "%arch%" equ "x86" if exist "%SystemDrive%\msys64\mingw32\bin" set PATH=%SystemDrive%\msys64\mingw32\bin;%PATH% | ||
|
||
if /i "%compiler%" equ "mingw" if /i "%arch%" equ "x64" if exist "%SystemDrive%\msys2\mingw64\bin" set PATH=%SystemDrive%\msys2\mingw64\bin;%PATH% | ||
if /i "%compiler%" equ "mingw" if /i "%arch%" equ "x86" if exist "%SystemDrive%\msys2\mingw32\bin" set PATH=%SystemDrive%\msys2\mingw32\bin;%PATH% | ||
|
||
REM | ------------------------------------------------------------------------- | ||
|
||
if exist "%vcpkg_dir%\.gitignore" ( | ||
pushd "%vcpkg_dir%" | ||
git pull --verbose || exit /b !errorlevel! | ||
call "%vcpkg_dir%\bootstrap-vcpkg.bat" -disableMetrics || exit /b !errorlevel! | ||
popd | ||
) else ( | ||
pushd "%vcpkg_dir%\.." | ||
git clone https://github.com/Microsoft/vcpkg.git "%vcpkg_dir%" || exit /b !errorlevel! | ||
call "%vcpkg_dir%\bootstrap-vcpkg.bat" -disableMetrics || exit /b !errorlevel! | ||
popd | ||
) | ||
|
||
REM | ------------------------------------------------------------------------- | ||
|
||
set vcpkg_installed=%vcpkg_dir%\installed | ||
set vcpkg_downloads=%vcpkg_dir%\downloads | ||
set vcpkg_buildtrees=%vcpkg_dir%\buildtrees | ||
set vcpkg_packages=%vcpkg_dir%\packages | ||
REM set vcpkg_archives=%vcpkg_dir%\archives | ||
set vcpkg_archives=%~dp0vcpkg\archives | ||
|
||
mkdir "%vcpkg_dir%" > nul 2> nul | ||
pushd "%vcpkg_dir%" | ||
|
||
vcpkg.exe ^ | ||
install ^ | ||
--triplet=%vcpkg_triplet% ^ | ||
--x-install-root="%vcpkg_installed%" ^ | ||
--downloads-root="%vcpkg_downloads%" ^ | ||
--x-buildtrees-root="%vcpkg_buildtrees%" ^ | ||
--binarysource=clear;files,"%vcpkg_archives%",readwrite ^ | ||
--x-packages-root="%vcpkg_packages%" ^ | ||
--no-print-usage | ||
|
||
popd | ||
exit /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", | ||
"name": "noname", | ||
"version": "1.0.0.0", | ||
"dependencies": | ||
[ | ||
{ | ||
"name": "curl", | ||
"default-features": false, | ||
"features": ["http2", "openssl", "brotli", "zstd", "tool"] | ||
} | ||
], | ||
"vcpkg-configuration": { | ||
"overlay-ports": [ "vcpkg_overlay_ports" ], | ||
"overlay-triplets": [ "vcpkg_overlay_triplets" ] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
index 6f84919..b838245 100644 | ||
--- a/lib/CMakeLists.txt | ||
+++ b/lib/CMakeLists.txt | ||
@@ -162,6 +162,9 @@ if(BUILD_STATIC_LIBS) | ||
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE | ||
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE) | ||
endif() | ||
+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") | ||
+ set_property(TARGET ${LIB_STATIC} APPEND PROPERTY COMPILE_DEFINITIONS "_WINSOCK_DEPRECATED_NO_WARNINGS") | ||
+ endif() | ||
if(CMAKEVERSION AND CMAKESONAME) | ||
set_target_properties(${LIB_STATIC} PROPERTIES | ||
VERSION ${CMAKEVERSION} SOVERSION ${CMAKESONAME}) | ||
@@ -197,6 +200,9 @@ if(BUILD_SHARED_LIBS) | ||
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE | ||
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE) | ||
endif() | ||
+ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") | ||
+ set_property(TARGET ${LIB_SHARED} APPEND PROPERTY COMPILE_DEFINITIONS "_WINSOCK_DEPRECATED_NO_WARNINGS") | ||
+ endif() | ||
if(CMAKEVERSION AND CMAKESONAME) | ||
set_target_properties(${LIB_SHARED} PROPERTIES | ||
VERSION ${CMAKEVERSION} SOVERSION ${CMAKESONAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt | ||
index b838245..3199160 100644 | ||
--- a/lib/CMakeLists.txt | ||
+++ b/lib/CMakeLists.txt | ||
@@ -92,7 +92,6 @@ endif() | ||
if(WIN32 AND | ||
NOT IMPORT_LIB_SUFFIX AND | ||
CMAKE_STATIC_LIBRARY_SUFFIX STREQUAL CMAKE_IMPORT_LIBRARY_SUFFIX) | ||
- set(IMPORT_LIB_SUFFIX "_imp") | ||
endif() | ||
|
||
# Whether to do a single compilation pass for libcurl sources and reuse these |
Oops, something went wrong.