Skip to content

Commit

Permalink
Fix webcam for windows
Browse files Browse the repository at this point in the history
(took 3.x PR and made it 4.0 compatible)
  • Loading branch information
RedMser committed Apr 24, 2022
1 parent 7d6f878 commit 70921fe
Show file tree
Hide file tree
Showing 5 changed files with 1,239 additions and 34 deletions.
18 changes: 17 additions & 1 deletion modules/camera/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,23 @@ env_camera = env_modules.Clone()
if env["platform"] == "windows":
env_camera.add_source_files(env.modules_sources, "register_types.cpp")
env_camera.add_source_files(env.modules_sources, "camera_win.cpp")

if not env.msvc:
# MinGW
env.Append(
LIBS=[
"mf",
"mfplat",
"mfuuid",
"shlwapi",
"evr", # MFGetStrideForBitmapInfoHeader
]
)
else:
# MSVC
env.Append(LINKFLAGS=["mfcore.lib"])
env.Append(LINKFLAGS=["mfplat.lib"])
env.Append(LINKFLAGS=["mfreadwrite.lib"])
env.Append(LINKFLAGS=["mfuuid.lib"])
elif env["platform"] == "osx":
env_camera.add_source_files(env.modules_sources, "register_types.cpp")
env_camera.add_source_files(env.modules_sources, "camera_osx.mm")

0 comments on commit 70921fe

Please sign in to comment.