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

Build on windows CMAKE_ARGS using generator with spaces doesn't work #1086

Open
timorkal opened this issue Feb 21, 2025 · 0 comments
Open

Build on windows CMAKE_ARGS using generator with spaces doesn't work #1086

timorkal opened this issue Feb 21, 2025 · 0 comments

Comments

@timorkal
Copy link

Hello,
I am trying to build opencv-python with GStreamer on Windows with custom CMAKE_ARGS.
As Gstreamer was compiled with MSVC 2019 and I have Visual Studio 2022 (with MSVC 2019 Build Tools), I need to specify 2 flags so the Linker will be able to work:
-G "Visual Studio 17 2022" -T v142
This works for me when I run directly the "cmake" command.
But in my case I would like to create python wheels, that is why I use the pip wheel . --verbose command to build it.

Unfortunatly I coudn't make it work, because as I pass these through the CMAKE_ARGS it complains that it look for "Visual" word only and not the whole "Visual Studio 17 2022" phrase.

$env:CMAKE_ARGS='-G "Visual Studio 17 2022" -T v142 -DWITH_GSTREAMER=ON'
py.exe -V:3.11 -m pip wheel . --verbose
CMake Error: Could not create named generator "Visual

Can you please help me with it?

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

1 participant