Comments (14)
put vcpkg.json & vcpkg-configuration.json under vcpkg dir
You should put these files in the same folder your root CMakeLists.txt is located.
.\vcpkg.exe integrate install
.\vcpkg.exe install
These steps are unnecessary. Vcpkg toolchain will call vcpkg install
automatically.
from vcpkg.
PS D:\xliu\fvs\FVSCore\3rdparty\colmap> cmake -B build_debug -S . -DCMAKE_TOOLCHAIN_FILE=D:\vcpkg\scripts\buildsystems\vcpkg.cmake
-- Selecting Windows SDK version 10.0.20348.0 to target Windows 10.0.19045.
CMake Error at CMakeLists.txt:90 (find_package):
By not providing "FindCeres.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Ceres", but
CMake did not find one.
Could not find a package configuration file provided by "Ceres" with any of
the following names:
CeresConfig.cmake
ceres-config.cmake
Add the installation prefix of "Ceres" to CMAKE_PREFIX_PATH or set
"Ceres_DIR" to a directory containing one of the above files. If "Ceres"
provides a separate development package or SDK, be sure it has been
installed.
-- Configuring incomplete, errors occurred!
I put vcpkg.json & vcpkg-configuration.json under app root dir. Now I got this? Did I miss something?
from vcpkg.
Can't say without proper configure log.
from vcpkg.
Could you please provide your CMakeLists.txt file?
from vcpkg.
Hi, I played with it a little more, and the build passed, though I didn't know why :(
I do have some questions:
- when I run a cmake or visualstudio project build, which has been enabled vcpkg manifest mode, it will start with intalling vcpkg packages. How does it know where's vcpkg dir? Throught VCPKG_ROOT env?
- what happens if I use different versions of the same package. for example, in project A, I use ceres 1.x, while in project B I use ceres 2.1, and both projects build against the same VCPKG_ROOT. Since the ceres lib's file name does not have version number in it, will it confilict?
from vcpkg.
- For CMake, you need to pass the parameter
-DCMAKE_TOOLCHAIN_FILE:STRING="VCPKG_ROOT\scripts\buildsystems\vcpkg.cmake"
; for Visual Studio, you need to setUse Vcpkg Manifest
toYes
in the project properties. - If each of your projects has a corresponding
vcpkg.json
, vcpkg will store the installed ports in the vcpkg_installed directory under the corresponding project, and they will not interfere with each other.
from vcpkg.
follow up of question 1: for Visual Studio, running "vcpkg.exe integrate install" under VCPKG_ROOT is needed, right?
another question:
- I want to shrink the size of our CI container's image. It's currently very large because of VCPKG_ROOT. Any suggestion? Maybe skipping debug build somehow? Or enabling a "--clean-after-build" like in classic mode?
from vcpkg.
- you don't need
vcpkg integrate install
if you use vcpkg toolchain. - Don't rebuild packages each time, use binarycaching.
- There are
*-release
triplets that do that. VCPKG_INSTALL_OPTIONS=--clean-after-build
though you probably don't want to clean downloads.
from vcpkg.
- but how does a visual studio project know where or which vcpkg dir is? There's only a true/false switch in project's property configurations to set/unset manifest mode, no pointer to vcpkg dir.
- I noticed the binarycaching. My understanding is, all the binaries ever installed will be cached in vcpkg dir. Whenever a project need it by manifest mode, it'll install a copy to project root dir's vcpkg_installed folder
- Could you please elaborate? how to use *-release?
- is this a Cmake options? how to use it?
from vcpkg.
- If you are using a regular VS console project, you need to run
vcpkg integrate install
before opening VS. This will ensure that the vcpkg recognized by your project is the one where you executed the command. If you are using a CMake project, as Osyotr mentioned, you can directly use the vcpkg toolchain. - You can set the installed triplet to
x64-windows-release
. - This is a parameter for
vcpkg install
. You can use it like this:vcpkg install --clean-after-build
.
from vcpkg.
- Sure I can use vcpkg install --clean-after-build, but this is classic mode, meaning I can't override the version of a specifc package, can I?
from vcpkg.
At this point you should start using search engines ;)
https://learn.microsoft.com/en-us/vcpkg/users/buildsystems/cmake-integration#vcpkg_install_options
from vcpkg.
Thanks guys. I have one last question:
While I'm using a pretty old baseline, tag 2022.11.14. When building in classic mode, I noticed some packages' url is invalid, resulting in download error like this:
Downloading https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-a
ny.pkg.tar.zst
error: Failed to download from mirror set
error: https://repo.msys2.org/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: failed
: status code 404
https://www2.futureware.at/~nickoe/msys2-mirror/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.p
kg.tar.zst: failed: status code 404
https://mirror.yandex.ru/mirrors/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zs
t: failed: status code 404
https://mirrors.tuna.tsinghua.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.ta
r.zst: failed: status code 404
https://mirrors.ustc.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: fa
iled: status code 404
https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinH
ttpSendRequest() failed: 12007
https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinH
ttpSendRequest() failed: 12007
https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinH
ttpSendRequest() failed: 12007
https://mirror.bit.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: WinH
ttpSendRequest() failed: 12007
https://mirror.selfnet.de/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.zst: fail
ed: status code 404
https://mirrors.sjtug.sjtu.edu.cn/msys2/mingw/i686/mingw-w64-i686-libwinpthread-git-9.0.0.6373.5be8fcd83-1-any.pkg.tar.z
st: failed: status code 404
Then I tried manifest mode, using the same baseline, it works without this issue. How come this difference?
from vcpkg.
You seem to use an old checkout in classic mode, so old central scripts want to use old URLs which no longer work.
In contrast, manifest mode can use up-to-date central scripts with old port versions.
from vcpkg.
Related Issues (20)
- [dbus] Download failed, gitlab.freedesktop.org is currently under maintenance HOT 3
- sentry-native port requires zlib dependency on windows + problems on linux HOT 6
- [eigen3] Build error on x64-windows HOT 1
- [spdlog] fmt dependency HOT 2
- [boost-variant2] Build error on x64-windows-static HOT 6
- [libimobiledevice] HOT 1
- mongo-c-driver update to 1.27.2
- Release builds on Windows include Deubg symbols, but not on Linux HOT 7
- Unable to use GitHub packages for binary cache HOT 3
- [libpng] Build error on x64-windows HOT 1
- Opencv4[freetype] does not install properly
- [sleef] update to 3.6
- [boost-build] Build error on x64-windows HOT 1
- [qt5-base] Respect VCKPG_CXX_FLAGS_RELEASE
- [zlib-ng] wrong library name
- [OpenSSL] update to <3.3.1>
- [libdatachannel] update to <0.21.1>
- [boost-context] build failure on x86-linux after PR #32309 HOT 8
- [v8] fetch submodules use local files HOT 1
- [EXIV2] build failure HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vcpkg.