How do I use a custom triplet from a custom vcpkg registry via vcpkg-configuration.json in manifest mode? #42523
-
I have a private git vcpkg registry for some private ports that works per the documentation with any triplet from Microsoft's registry. My internal registry has one custom triplet in it called set( VCPKG_TARGET_ARCHITECTURE x64 )
if( ${PORT} MATCHES "serf|apr" )
set( VCPKG_CRT_LINKAGE dynamic )
set( VCPKG_LIBRARY_LINKAGE dynamic )
else()
set( VCPKG_CRT_LINKAGE static )
set( VCPKG_LIBRARY_LINKAGE static )
endif() My project's vckpg-configuration.json: {
"default-registry": null,
"registries":[
{
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "9b5cb8e554487f3edb5d50b80188883846f81e14",
"packages": ["*"]
},
{
"kind": "git",
"repository": "https://private/url/_git/private-registry",
"baseline": "some valid git hash",
"packages": ["apache-subversion", "unittest-utils"]
}
]
} I found this post which was helpful, but it doesn't explain how to use the custom triplet when multiple git registries are being used. Here is my project's vcpkg.json: {
"name": "myproject",
"dependencies": [
"apr", # This one comes from Microsoft's registry
"apache-subversion", # These last two come from my private registry.
"unittest-utils"
]
} Setting my triplet in my CMakeLists.txt: if( BUILD_SHARED_LIBS )
set( CMAKE_MSVC_RUNTIME_LIBRARY MultiThreaded$<$<CONFIG:Debug>:Debug>DLL )
set( VCPKG_TARGET_TRIPLET x64-windows )
else()
set( VCPKG_TARGET_TRIPLET x64-windows-mostly-static )
endif() Things build fine if I use the standard Is it possible to configure things in the Maybe the way I'm setting things up isn't quite right/ideal? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
This. Vcpkg doesn't even checkout your repo. Vcpkg registries are port registries. |
Beta Was this translation helpful? Give feedback.
This. Vcpkg doesn't even checkout your repo. Vcpkg registries are port registries.