Vcpkg: Document 'vcpkg import' command

Created on 15 Feb 2018  路  6Comments  路  Source: microsoft/vcpkg

This command sounds like a useful addition. However, I wasn't able to figure out the purpose and intended usage. Please point me to an existing documentation or provide the information here.

documentation

Most helpful comment

@PhoebeHui No, it does not solve the issue. What is the intended effect of the import command? What is a CONTROLfile? includedir? projectdir?

All 6 comments

@paul-michalik , you can simply find the explanation like:

PS F:vcpkg\src> ./vcpkg --help
Commands:
vcpkg search [pat] Search for packages available to be built
vcpkg install ... Install a package
vcpkg remove ... Uninstall a package
vcpkg remove --outdated Uninstall all out-of-date packages
vcpkg list List installed packages
vcpkg update Display list of packages for updating
vcpkg upgrade Rebuild all outdated packages
vcpkg hash [alg] Hash a file by specific algorithm, default SHA512
vcpkg help topics Display the list of help topics
vcpkg help Display help for a specific topic

vcpkg integrate install Make installed packages available user-wide. Requires admin privileges on first use
vcpkg integrate remove Remove user-wide integration
vcpkg integrate project Generate a referencing nuget package for individual VS project use
vcpkg integrate powershell Enable PowerShell Tab-Completion

vcpkg export ... [opt]... Exports a package
vcpkg edit Open up a port for editing (uses %EDITOR%, default 'code')
vcpkg import Import a pre-built library
vcpkg create
[archivename] Create a new package
vcpkg owns Search for files in installed packages
vcpkg env Creates a clean shell environment for development or compiling.
vcpkg version Display version information
vcpkg contact Display contact information to send feedback

Options:
--triplet Specify the target architecture triplet.
(default: %VCPKG_DEFAULT_TRIPLET%, see 'vcpkg help triplet')

--vcpkg-root Specify the vcpkg root directory
(default: %VCPKG_ROOT%)

@response_file Specify a response file to provide additional parameters

For more help (including examples) see the accompanying README.md.
PS F:vcpkg\src> ./vcpkg import
Error: 'import' requires 3 arguments, but 0 were provided.
Example:
vcpkg import C:\path\to\CONTROLfile C:\path\toincludedir C:\path\to\projectdir

Options:
--triplet Set the default triplet for unqualified packages
--vcpkg-root Specify the vcpkg directory to use instead of current directory or tool directory

Does it solve you issue?

@PhoebeHui No, it does not solve the issue. What is the intended effect of the import command? What is a CONTROLfile? includedir? projectdir?

I'd like to know what's the CONTROLfile too, is it the .cmake as the example say:
cmake .. "-DCMAKE_TOOLCHAIN_FILE=E:/workspace/vcpkg/vcpkg-export-20170502-161923/scripts/buildsystems/vcpkg.cmake"
(in https://devblogs.microsoft.com/cppblog/vcpkg-introducing-export-command/)

@HagegeR The CONTROL file provides the port name, description, version, home page, features and dependent ports.
See documentation.

so it's not another way of installing files exported using the export command, got it.
thanks!

Yeah, that is the obvious interpretation, right? export - import...

Was this page helpful?
0 / 5 - 0 ratings