Giter Club home page Giter Club logo

vcpkg's Introduction

๐ŸŒ Read in a different language

vcpkg overview

vcpkg is a free and open-source C/C++ package manager maintained by Microsoft and the C++ community.

Initially launched in 2016 as a tool for assisting developers in migrating their projects to newer versions of Visual Studio, vcpkg has evolved into a cross-platform tool used by developers on Windows, macOS, and Linux. vcpkg has a large collection of open-source libraries and enterprise-ready features designed to facilitate your development process with support for any build and project systems. vcpkg is a C++ tool at heart and is written in C++ with scripts in CMake. It is designed from the ground up to address the unique pain points C/C++ developers experience.

This tool and ecosystem are constantly evolving, and we always appreciate contributions! Learn how to start contributing with our packaging tutorial and maintainer guide.

Get started

First, follow one of our quick start guides.

Whether you're using CMake, MSBuild, or any other build system, vcpkg has you covered:

You can also use any editor:

If a library you need is not present in the vcpkg registry, open an issue on the GitHub repository or contribute the package yourself.

After you've gotten vcpkg installed and working, you may wish to add tab completion to your terminal.

Use vcpkg

Create a manifest for your project's dependencies:

vcpkg new --application
vcpkg add port fmt

Or install packages through the command line:

vcpkg install fmt

Then use one of our available integrations for CMake, MSBuild or other build systems.

For a short description of all available commands, run vcpkg help. Run vcpkg help [topic] for details on a specific topic.

Key features

vcpkg offers powerful features for your package management needs:

Contribute

vcpkg is an open source project, and is thus built with your contributions. Here are some ways you can contribute:

Please refer to our mantainer guide and packaging tutorial for more details.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or email [email protected] with any additional questions or comments.

Resources

License

The code in this repository is licensed under the MIT License. The libraries provided by ports are licensed under the terms of their original authors. Where available, vcpkg places the associated license(s) in the location installed/<triplet>/share/<port>/copyright.

Security

Most ports in vcpkg build the libraries in question using the original build system preferred by the original developers of those libraries, and download source code and build tools from their official distribution locations. For use behind a firewall, the specific access needed will depend on which ports are being installed. If you must install it in an "air gapped" environment, consider instaling once in a non-"air gapped" environment, populating an asset cache shared with the otherwise "air gapped" environment.

Telemetry

vcpkg collects usage data in order to help us improve your experience. The data collected by Microsoft is anonymous. You can opt-out of telemetry by:

  • running the bootstrap-vcpkg script with -disableMetrics
  • passing --disable-metrics to vcpkg on the command line
  • setting the VCPKG_DISABLE_METRICS environment variable

Read more about vcpkg telemetry at https://learn.microsoft.com/vcpkg/about/privacy.

vcpkg's People

Contributors

adela0814 avatar alexkaratarakis avatar atkawa7 avatar autoantwort avatar billyoneal avatar cenit avatar chausner avatar cheney-w avatar codicodi avatar coryan avatar dg0yt avatar frankxie05 avatar jackboosy avatar jiayuehua avatar jimwang118 avatar jonliu1993 avatar lilywangl avatar lilywangll avatar monicaliu0311 avatar myd7349 avatar nancyli1013 avatar neumann-a avatar phoebehui avatar ras0219 avatar ras0219-msft avatar rastaban avatar rt2code avatar strega-nil avatar thomas1664 avatar vicroms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vcpkg's Issues

FINDSTR line too long when building boost

When building boost, the post-build validation step displays:

-- Performing post-build validation
FINDSTR: Line 552 is too long.
FINDSTR: Line 563 is too long.
FINDSTR: Line 552 is too long.
FINDSTR: Line 563 is too long.
-- Performing post-build validation done

rapidjson doesn't install

Returns the following error:

CMake error at ports/rapidjson/portfile.cmake:1 (include):
include could not find load file:
winports_common_functions
Call Stack (most recent call first):
scripts/ports.cmake:84 (include)

Find a testing solution

As stated in #41, we should find a proper way to test the portfiles.
An ideal system would be to automatically test new/updated portfiles after each push and ignore those which were untouched.

Official mechanism to backfill/pin older library versions [was: multiple versions]

Sometimes there is a reason to use a specific older version of a library. Usually, it happens due to API changes the project can't absorb right now or 3rd-party libraries that aren't compatible with the newer version (yet).

Seems like a good idea to allow installation of an older version and maybe even having a few versions installed side-by-side.

Migrate to SHA-512

We currently use MD5 for integrity checking downloads, however this is provably breakable (even if improbable). We should upgrade all hashes to SHA-512 and require it going forward.

Boost picks up site-config, which will break builds

I can't instal boost on my machine (Win10, VS2015 U3) it seems as if the build script expects a g++ compiler.

This is the output from powershell:

-- Building x64-windows-rel
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:14 (message):
Command failed:
C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/b2.exe;--stagedir=C:/xTools/vcpkg/vcpkg/buildtrees/boost/x64-windows-rel/stage;--build-dir=C:/xTools/vcpkg/vcpkg/buildtrees/boost/x64-windows-rel;--toolset=msvc;-j4;-q;--without-python;threading=multi;link=shared;runtime-link=shared;--debug-configuration;address-model=64;variant=release

Working Directory: C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0

See logs for more information:

 C:\xTools\vcpkg\vcpkg\buildtrees\boost\build-x64-windows-rel-out.log
 C:\xTools\vcpkg\vcpkg\buildtrees\boost\build-x64-windows-rel-err.log

Call Stack (most recent call first):
ports/boost/portfile.cmake:38 (vcpkg_execute_required_process)
scripts/ports.cmake:84 (include)`

Error: build command failed

And this is the content of C:\xTools\vcpkg\vcpkg\buildtrees\boost\build-x64-windows-rel-out.log

notice: found boost-build.jam at C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/boost-build.jam
notice: loading Boost.Build from C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src
notice: Searching 'C:\WINDOWS' [...] 'C:\xTools\vcpkg\vcpkg\buildtrees\boost\src\boost_1_61_0\tools/build/src' 'C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src/kernel' 'C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src/util' 'C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src/build' 'C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src/tools' 'C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src/contrib' 'C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src/.' for site-config configuration file 'site-config.jam'.
notice: Loading site-config configuration file 'site-config.jam' from 'C:/Users/'.
warning: toolset gcc initialization: can not find tool g++
warning: initialized from C:\Usersl\site-config.jam:1
C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src/tools\gcc.jam:150: in gcc.init from module gcc
error: toolset gcc initialization:
error: no command provided, default command 'g++' not found
error: initialized from C:\Users\site-config.jam:1
C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src/build\toolset.jam:43: in toolset.using from module toolset
C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src/build\project.jam:1052: in using from module project-rules
C:\Users\site-config.jam:1: in modules.load from module site-config
C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src\build-system.jam:249: in load-config from module build-system
C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src\build-system.jam:351: in load-configuration-files from module build-system
C:/xTools/vcpkg/vcpkg/buildtrees/boost/src/boost_1_61_0/tools/build/src\build-system.jam:524: in load from module build-system
C:\xTools\vcpkg\vcpkg\buildtrees\boost\src\boost_1_61_0\tools\build\src/kernel\modules.jam:295: in import from module modules
C:\xTools\vcpkg\vcpkg\buildtrees\boost\src\boost_1_61_0\tools\build\src/kernel/bootstrap.jam:139: in boost-build from module
C:\xTools\vcpkg\vcpkg\buildtrees\boost\src\boost_1_61_0\boost-build.jam:17: in module scope from module

Support static linking with /MT /MTd

Maybe it is already possible, but the docs so far appear to imply code gets compiled into DLLs.

Please also support compiling all code into a .lib with /MT /MTd runtime libraries for those of use who prefer their executables to be self-contained (or document how it is done).

Error installing tiff lib

c:\vcpkg>vcpkg.exe install tiff
-- CURRENT_INSTALLED_DIR=C:/vcpkg/installed/x86-windows
-- DOWNLOADS=C:/vcpkg/downloads
-- CURRENT_PACKAGES_DIR=C:/vcpkg/packages/tiff_x86-windows
-- CURRENT_BUILDTREES_DIR=C:/vcpkg/buildtrees/tiff
-- CURRENT_PORT_DIR=c:/vcpkg/ports/tiff/.
-- Downloading ftp://ftp.remotesensing.org/pub/libtiff/tiff-4.0.6.tar.gz
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:17 (file):
file DOWNLOAD HASH mismatch

for file: [C:/vcpkg/downloads/tiff-4.0.6.tar.gz]
  expected hash: [d1d2e940dea0b5ad435f21f03d96dd72]
    actual hash: [d41d8cd98f00b204e9800998ecf8427e]
         status: [6;"Couldn't resolve host name"]

Call Stack (most recent call first):
ports/tiff/portfile.cmake:2 (vcpkg_download_distfile)
scripts/ports.cmake:84 (include)

Error: build command failed

Add libxml2

libxml2 is famous xml library and widely used in C world. http://xmlsoft.org/
If we can use libxml2 by vcpkg, many other xml software will be open to vcpkg.

How distribute exe tools like protobuf compiler?

vcpkg install return error:

The following EXEs were found in /bin and /debug/bin. EXEs are not valid distribution targets.

    D:/Work/vcpkg/packages/protobuf_x86-windows/bin/protoc.exe

but we need protoc.exe for using protobuf library

Add Thrift

It would be great to have Apache Thrift in the available list of packages

integrate install fails after recent commit

Hi, commit 81d6426 causes the integrate install command to fail (or report failure) for me. The check:

Checks::check_exit(fs::exists(system_wide_targets_file), "Error: failed to copy targets file to %s", system_wide_targets_file.string());

in commands_integration.cpp now fails as it appears to be checking for a different file to the one that was XCOPY'd.

Update: the destination file has "ts" appended to it. Playing with xcopy, it seems to be padding/extending/completing the destfile extension with what came from the original file:

C:\>xcopy "C:\test.first.second" "C:\test.third*" /Y >nul

C:\>dir
 Volume in drive C has no label.
 Volume Serial Number is AAAA-AAAA

 Directory of C:\

21/09/2016  18:40               414 test.first.second
21/09/2016  18:40               414 test.thirdd

I assume this behaviour of xcopy is well understood by people who aren't me!

Error updating boost

I tried to update boost from 1.60 to 1.61 using these commands:

vcpkg remove --purge boost:x86-windows 
vcpkg install boost:x86-windows

but the installation failed because of linking errors. The old build directories (1.60) were still there and they probably contained the old files. After removing these directories (buildtrees\boost\x86-windows-rel and buildtrees\boost\x86-windows-dbg) the installation went fine.

Should these directories be removed by the vcpkg remove command?
Is it ok to remove everything in buildtrees\* after installing a package?

Reconsider cross-platform stance

Saying "we don't want to duplicate the apt-get on Linux" makes a lot of sense as a reason why vcpkg is not cross-platform.

Except, when it comes to managing dependencies, versions, and how to refer to them from your project / CMake, vcpkg and apt-get are not that alike at all. For someone working cross-platform, having to test in different way, instruct their users how to build in different ways etc. is not helpful.

And since vcpkg builds upon CMake, making it cross-platform should at least technically not be hard.

vcpkg appears very well thought out, it be great to take the benefits of this to C++ developers even further.

Change default triplet

The default triplet is "x86-windows".

Since we mainly develop very memory demanding applications, I build all libraries for x64. This means I always have to use "vcpkg install boost:x64-windows" etc. It would be very convenient to make it possible to let the user set a default triplet that is then used when building any package.

Add MPIR

https://github.com/wbhart/mpir

MPIR is a fork of the GNU Multi Precision library (GMP -- see http://gmplib.org)

MPIR is a library for arbitrary precision arithmetic, operating on signed
integers, rational numbers, and floating point numbers. It has a rich set of
functions, and the functions have a regular interface.

MPIR is designed to be as fast as possible, both for small operands and huge
operands. The speed is achieved by using fullwords as the basic arithmetic
type, by using fast algorithms, with carefully optimized assembly code for the
most common inner loops for lots of CPUs, and by a general emphasis on speed
(instead of simplicity or elegance).

GMP/MPIR is believed to be faster than any other similar library. Its advantage
increases with operand sizes for certain operations, since MPIR in many
cases has asymptotically faster algorithms.

Add mirror support for `vcpkg_download_distfile`

port files refer directly to URLs of external websites, e.g. for Curl: "https://curl.haxx.se/download/curl-7.48.0.tar.bz2". That is very brittle, in that if that site were to go down, suddenly potentially a lot of programmers can't build their code.

That may be an acceptable trade-off for individual programmers, but for a larger organization having the teams ability to work depend on many external sites may be a deal breaker, unless there was some easy way to (locally?) cache things.

Add Bond

https://microsoft.github.io/bond/

Bond is an open source, cross-platform framework for working with schematized data. It supports cross-language serialization/deserialization and powerful generic mechanisms for efficiently manipulating data.

Note: The bond compiler is written in Haskell. I'm not aware of an official binary release.

Add ChakraCore

https://github.com/Microsoft/ChakraCore

ChakraCore is the core part of Chakra, the high-performance JavaScript engine that powers Microsoft Edge and Windows applications written in HTML/CSS/JS. ChakraCore supports Just-in-time (JIT) compilation of JavaScript for x86/x64/ARM, garbage collection, and a wide range of the latest JavaScript features. ChakraCore also supports the JavaScript Runtime (JSRT) APIs, which allows you to easily embed ChakraCore in your applications.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.