#gitkからリポジトリをクローンします
C:\ > git clone https://github.com/microsoft/vcpkg.git
Cloning into 'vcpkg'...
remote: Enumerating objects: 237501, done.
remote: Counting objects: 100% (269/269), done.
remote: Compressing objects: 100% (224/224), done.
remote: Total 237501 (delta 117), reused 152 (delta 45), pack-reused 237232Receiving objects: 100% (237501/237501), 69.7
Resolving deltas: 100% (157898/157898), done.
Updating files: 100% (11402/11402), done.
# カレントフォルダにvcpkgというフォルダができるので、移動します
C:\ > cd vcpkg
C:\vcpkg\ > bootstrap-vcpkg.bat # インストール開始
Downloading https://github.com/microsoft/vcpkg-tool/releases/download/2024-06-10/vcpkg.exe -> C:\vcpkg\vcpkg.exe... done.
Validating signature... done.
vcpkg package management program version 2024-06-10-02590c430e4ed9215d27870138c2e579cc338772
See LICENSE.txt for license information.
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 re-running the bootstrap-vcpkg script with -disableMetrics,
passing --disable-metrics to vcpkg on the command line,
or by setting the VCPKG_DISABLE_METRICS environment variable.
Read more about vcpkg telemetry at docs/about/privacy.md
# パッケージの検索
C:\vcpkg>vcpkg search curses
ncurses 6.4#2 Free software emulation of curses in System V Release 4.0, and more
pdcurses 3.9#6 Public Domain Curses - a curses library for environments that don't fit th...
The result may be outdated. Run `git pull` to get the latest results.
If your port is not listed, please open an issue at and/or consider making a pull request. - https://github.com/Microsoft/vcpkg/issues
# cursesパッケージのインストール
C:\vcpkg > vcpkg install pdcurses
Computing installation plan...
A suitable version of cmake was not found (required v3.29.2) Downloading portable cmake 3.29.2...
Downloading cmake...
>C:\vcpkg\downloads\cmake-3.29.2-windows-i386.zip
Downloading https://github.com/Kitware/CMake/releases/download/v3.29.2/cmake-3.29.2-windows-i386.zip
Extracting cmake...
The following packages will be built and installed:
pdcurses:x64-windows@3.9#6
Detecting compiler hash for triplet x64-windows...
A suitable version of powershell-core was not found (required v7.2.16) Downloading portable powershell-core 7.2.16...
Downloading powershell-core...
>C:\vcpkg\downloads\PowerShell-7.2.16-win-x64.zip
Downloading https://github.com/PowerShell/PowerShell/releases/download/v7.2.16/PowerShell-7.2.16-win-x64.zip
Extracting powershell-core...
Compiler found: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.38.33130/bin/Hostx64/x64/cl.exe
A suitable version of 7zip was not found (required v24.6.0) Downloading portable 7zip 24.6.0...
Downloading 7zip...
>C:\vcpkg\downloads\7z2406-extra.7z
Downloading https://github.com/ip7z/7zip/releases/download/24.06/7z2406-extra.7z
Extracting 7zip...
Restored 0 package(s) from C:\?????\AppData\Local\vcpkg\archives in 398 us. Use --debug to see more details.
Installing 1/1 pdcurses:x64-windows@3.9#6...
Building pdcurses:x64-windows@3.9#6...
-- Downloading https://github.com/wmcbrine/PDCurses/archive/3.9.tar.gz -> wmcbrine-PDCurses-3.9.tar.gz...
-- Extracting source C:/vcpkg/downloads/wmcbrine-PDCurses-3.9.tar.gz
-- Applying patch nmake-install.patch
-- Using source at C:/vcpkg/buildtrees/pdcurses/src/3.9-2f00932d3e.clean
-- Found external ninja('1.11.0').
-- Getting CMake variables for x64-windows
-- Building and installing x64-windows-dbg
-- Building and installing x64-windows-rel
CMake Warning at scripts/cmake/vcpkg_copy_pdbs.cmake:44 (message):
Could not find a matching pdb file for:
C:/vcpkg/packages/pdcurses_x64-windows/bin/pdcurses.dll
C:/vcpkg/packages/pdcurses_x64-windows/debug/bin/pdcurses.dll
Call Stack (most recent call first):
ports/pdcurses/portfile.cmake:36 (vcpkg_copy_pdbs)
scripts/ports.cmake:191 (include)
-- Installing: C:/vcpkg/packages/pdcurses_x64-windows/share/unofficial-pdcurses/unofficial-pdcurses-config.cmake
-- Installing: C:/vcpkg/packages/pdcurses_x64-windows/share/pdcurses/copyright
-- Performing post-build validation
Stored binaries in 1 destinations in 142 ms.
Elapsed time to handle pdcurses:x64-windows: 9 s
pdcurses:x64-windows package ABI: e667a39f440407bf7f4244d957f88d05d04fc202fba012ae78d7e9ad2ec3ac40
Total install time: 9 s
pdcurses provides CMake targets:
# this is heuristically generated, and may not be correct
find_package(unofficial-pdcurses CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::pdcurses::pdcurses)
# 何もしなくても勝手にインストールされました
C:\vcpkg > vcpkg integrate install
Applied user-wide integration for this vcpkg root.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake"
All MSBuild C++ projects can now #include any installed libraries. Linking will be handled automatically. Installing new libraries will make them instantly available.