Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Environment variable] add an Environment variable like VCPKG_DISABLE to disable vcpkg integration once but not global #37518

Closed
congzhangzh opened this issue Mar 17, 2024 · 3 comments
Assignees
Labels
category:question This issue is a question

Comments

@congzhangzh
Copy link
Contributor

Is your feature request related to a problem? Please describe.

node windows compile failed if zlib is installed by vcpkg and vcpkg integration install is done

I can confirm that because the node link error gone after vcpkg integration remove

Ref: nodejs/node#24448

Proposed solution

add VCPKG_DISABLE to disable vcpkg integration for the child process, because my other c++ project depend on vcpkg integration.

this can be done either skip on user side, or system side:
image
image

Describe alternatives you've considered

do vcpkg integration remove and run other c++ project with cmake toolchain

Additional context

https://learn.microsoft.com/en-us/vcpkg/users/config-environment

@congzhangzh congzhangzh added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Mar 17, 2024
@congzhangzh congzhangzh changed the title add a Environment variables like VCPKG_DISABLE to disable vcpkg integration once but not global add an Environment variables like VCPKG_DISABLE to disable vcpkg integration once but not global Mar 17, 2024
@congzhangzh congzhangzh changed the title add an Environment variables like VCPKG_DISABLE to disable vcpkg integration once but not global [New Environment variable] add an Environment variable like VCPKG_DISABLE to disable vcpkg integration once but not global Mar 17, 2024
@FrankXie05
Copy link
Contributor

@congzhangzh Thanks for posting this issue.
For each project, their property interface has a corresponding button Use Vcpkg to enable vcpkg.
If you only want some sub-projects to use vcpkg, you only need to open the corresponding property interface and set Use Vcpkg to No.

image

@FrankXie05 FrankXie05 added category:question This issue is a question and removed category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist labels Mar 18, 2024
@congzhangzh
Copy link
Contributor Author

@FrankXie05 tks for your replay, that's a way, but that's not always possible, especially for batch shell script.

for example, if I can pass something to msbuild I can do

msbuild ... /p:UseVcpkg=false

I already do this: https://github.com/congzhangzh/node/blob/66a6e5ee463491b6c0416d4393cd27bf985747a5/vcbuild.bat#L335

but if this happened for some inner call, for example, A shell call B, B shell call C, and C need to disable vcpkg, and A=>B can not accept and pass something to C's msbuild, like B&C is some third party application or shell, I can do nothing.

@congzhangzh
Copy link
Contributor Author

something like Directory.build.props is another way, but that's another story:)

@microsoft microsoft locked and limited conversation to collaborators Mar 19, 2024
@FrankXie05 FrankXie05 converted this issue into discussion #37546 Mar 19, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
category:question This issue is a question
Projects
None yet
Development

No branches or pull requests

2 participants