Skip to content

Commit

Permalink
Merge pull request #20 from negrutiu/feature/GH-19-vcpkg-curl
Browse files Browse the repository at this point in the history
Use `curl` from `vcpkg`
  • Loading branch information
negrutiu authored Jun 1, 2024
2 parents e2867eb + 6c2f8d1 commit 3ad2337
Show file tree
Hide file tree
Showing 121 changed files with 3,099 additions and 608 deletions.
24 changes: 10 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@

*nogit*

curl-ca-bundle.crt
/libcurl-devel
/nsis
/src/nscurl/curl-ca-bundle.crt
/src/nscurl/nsis

libcurl-devel*.7z
libcurl-devel*.7z.etag
NScurl*.7z
/packages

/Test/*.exe
/Test/_*
/tests/*.exe
/tests/_*

/TestDebug/*.exe
/TestDebug/_*
/vcpkg

Debug-*
Release-*
ipch
.vs
/Debug-*
/Release-*
/ipch
/.vs

*.opensdf
*.sdf
Expand Down
41 changes: 41 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<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>

<NsisPlatform Condition="'$(Platform)'=='Win32'">x86</NsisPlatform>
<NsisPlatform Condition="'$(Platform)'=='x64'">amd64</NsisPlatform>

<CharacterSet Condition="'$(CharacterSet)'!=''">$(CharacterSet)</CharacterSet>
<CharacterSet Condition="'$(CharacterSet)'==''">Unicode</CharacterSet>

<NsisCharacterSet Condition="'$(CharacterSet)'=='MultiByte'">ansi</NsisCharacterSet>
<NsisCharacterSet Condition="'$(CharacterSet)'!='MultiByte'">unicode</NsisCharacterSet>

<OutDir>$(SolutionDir)$(Configuration)-msbuild-$(NsisPlatform)-$(NsisCharacterSet)\</OutDir>
<IntDir>$(SolutionDir)$(Configuration)-msbuild-$(NsisPlatform)-$(NsisCharacterSet)\IntDir\$(MSBuildProjectName)\</IntDir>
</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>
22 changes: 22 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

ifeq ($(OS),Windows_NT)
PLATFORM = windows
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
PLATFORM = linux
endif
ifeq ($(UNAME_S),Darwin)
PLATFORM = macos
endif
endif

.PHONY: all clean

clean:
@echo "Cleaning for platform: $(PLATFORM)"
@$(MAKE) -C src/nscurl -f Makefile.$(PLATFORM) clean

all:
@echo "Building for platform: $(PLATFORM)"
@$(MAKE) -C src/nscurl -f Makefile.$(PLATFORM) all
113 changes: 0 additions & 113 deletions Makefile.mingw

This file was deleted.

30 changes: 15 additions & 15 deletions NScurl.sln
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28307.902
# Visual Studio Version 17
VisualStudioVersion = 17.9.34728.123
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NScurl", "NScurl.vcxproj", "{FE51110F-82BE-423E-800C-F5951C998D22}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NScurl", "src\nscurl\NScurl.vcxproj", "{FE51110F-82BE-423E-800C-F5951C998D22}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug-x86-ansi|Win32 = Debug-x86-ansi|Win32
Debug-x86-unicode|Win32 = Debug-x86-unicode|Win32
Release-x86-ansi|Win32 = Release-x86-ansi|Win32
Release-x86-unicode|Win32 = Release-x86-unicode|Win32
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{FE51110F-82BE-423E-800C-F5951C998D22}.Debug-x86-ansi|Win32.ActiveCfg = Debug-x86-ansi|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Debug-x86-ansi|Win32.Build.0 = Debug-x86-ansi|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Debug-x86-unicode|Win32.ActiveCfg = Debug-x86-unicode|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Debug-x86-unicode|Win32.Build.0 = Debug-x86-unicode|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Release-x86-ansi|Win32.ActiveCfg = Release-x86-ansi|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Release-x86-ansi|Win32.Build.0 = Release-x86-ansi|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Release-x86-unicode|Win32.ActiveCfg = Release-x86-unicode|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Release-x86-unicode|Win32.Build.0 = Release-x86-unicode|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Debug|Win32.ActiveCfg = Debug|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Debug|Win32.Build.0 = Debug|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Debug|x64.ActiveCfg = Debug|x64
{FE51110F-82BE-423E-800C-F5951C998D22}.Debug|x64.Build.0 = Debug|x64
{FE51110F-82BE-423E-800C-F5951C998D22}.Release|Win32.ActiveCfg = Release|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Release|Win32.Build.0 = Release|Win32
{FE51110F-82BE-423E-800C-F5951C998D22}.Release|x64.ActiveCfg = Release|x64
{FE51110F-82BE-423E-800C-F5951C998D22}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ Pop $0
Project | License
:------ | :----------------------------------------------------
NScurl itself | [BSD3](LICENSE.md)
libcurl | [MIT/X inspired](https://curl.haxx.se/docs/copyright.html)
OpenSSL | [Apache v2](https://www.openssl.org/source/license.html)
brotli | [MIT](https://github.com/google/brotli/blob/master/LICENSE)
curl | [MIT/X inspired](https://curl.haxx.se/docs/copyright.html)
nghttp2 | [MIT](https://github.com/nghttp2/nghttp2/blob/master/COPYING)
OpenSSL | [Apache v2](https://www.openssl.org/source/license.html)
zlib | [zlib](https://www.zlib.net/zlib_license.html)
zstd | [BSD3](https://github.com/facebook/zstd/blob/dev/LICENSE)
63 changes: 0 additions & 63 deletions SConscript

This file was deleted.

25 changes: 0 additions & 25 deletions Test/NScurl-Test-build.bat

This file was deleted.

2 changes: 0 additions & 2 deletions TestDebug/cleanup.bat

This file was deleted.

6 changes: 0 additions & 6 deletions _acquire_curl-ca-bundle.bat

This file was deleted.

20 changes: 0 additions & 20 deletions _acquire_libcurl-devel.bat

This file was deleted.

Loading

0 comments on commit 3ad2337

Please sign in to comment.