Skip to content

Commit ea51e72

Browse files
authored
Update setup.py
1 parent 7b587e1 commit ea51e72

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

setup.py

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,12 @@ def main():
162162
# Raw paths relative to sourcetree root.
163163
files_outside_package_dir = {"cv2": ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"]}
164164

165-
if os.name == "nt":
166-
vs_env = os.environ.get("VISUAL_STUDIO")
167-
if vs_env == "17":
168-
generator_name = "Visual Studio 17 2022"
169-
arch = "x64" if is64 else "Win32"
170-
ci_cmake_generator = ["-G", generator_name, "-A", arch]
171-
else:
172-
generator_name = "Visual Studio 14" + (" Win64" if is64 else "")
173-
ci_cmake_generator = ["-G", generator_name]
174-
else:
175-
ci_cmake_generator = ["-G", "Unix Makefiles"]
176-
165+
ci_cmake_generator = (
166+
["-G", "Visual Studio 14" + (" Win64" if is64 else "")]
167+
if os.name == "nt"
168+
else ["-G", "Unix Makefiles"]
169+
)
170+
177171
cmake_args = (
178172
(ci_cmake_generator if is_CI_build else [])
179173
+ [
@@ -201,8 +195,6 @@ def main():
201195
"-DBUILD_DOCS=OFF",
202196
"-DPYTHON3_LIMITED_API=ON",
203197
"-DBUILD_OPENEXR=ON",
204-
"-DWITH_OBSENSOR=OFF",
205-
"-DWITH_MEDIAFOUNDATION=OFF",
206198
]
207199
+ (
208200
# CMake flags for windows/arm64 build

0 commit comments

Comments
 (0)