Skip to content
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

Find CMake bundled with MSVC #142

Open
knopp opened this issue Feb 17, 2022 · 1 comment
Open

Find CMake bundled with MSVC #142

knopp opened this issue Feb 17, 2022 · 1 comment

Comments

@knopp
Copy link

knopp commented Feb 17, 2022

Hi,

it would be quite useful if the crate could determine location of CMake binary bundled with MSVC. The usual location is

${msvcPath}\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin.

@shuffle2
Copy link

shuffle2 commented Apr 12, 2022

It would be nice, but what is your intent? If it's to build with cmake/<ninja/vs>/msvc, it would seem the standard way to bring cmake into PATH is to run vcvars script beforehand. In that case, I think it would be appropriate to add some way for the cmake or cc crate to find and execute the vcvars script as needed, instead. But I haven't seen other people doing that... :/

fwiw i've solved it like this: https://github.com/unicorn-engine/unicorn/blob/3fcfdcedd83284ce71d751fcec8b8d422a00ee87/bindings/rust/build.rs#L9 (but, it should be in a crate, I agree). Maybe some of the underlying msvc/VS-specific stuff (like cc crate's setup_config and/or vswhere wrapper) should be their own crates..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants