Skip to content

Commit 0dd09ec

Browse files
authored
Merge pull request #1189 from asmorkalov:as/disable_libavdevice_headless
Disable libavdevice for headless builds on Linux to get rid of X libs dependency
2 parents 9faa612 + e42eb55 commit 0dd09ec

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,10 @@ def main():
216216
# see: https://github.com/opencv/opencv-python/issues/771
217217
cmake_args.append("-DWITH_MSMF=OFF")
218218
cmake_args.append("-DWITH_OBSENSOR=OFF") # Orbbec cameras backend uses MSMF API
219+
# see: https://github.com/opencv/opencv/issues/28438
220+
# libavdevice is enabled by default, but brings libxcb dependency
221+
if sys.platform.startswith("linux"):
222+
cmake_args.append("-DOPENCV_FFMPEG_ENABLE_LIBAVDEVICE=OFF")
219223

220224
if sys.platform.startswith("linux") and not is64 and "bdist_wheel" in sys.argv:
221225
subprocess.check_call("patch -p0 < patches/patchOpenEXR", shell=True)

0 commit comments

Comments
 (0)