Skip to content

Commit 77f902b

Browse files
bernie-labergecedrik-fuoco-adsk
authored andcommitted
AcademySoftwareFoundation#604: Fix Blackmagic Video Output plugin build on Windows (AcademySoftwareFoundation#605)
### 604: Fix Blackmagic Video Output plugin build on Windows ### Linked issues Fixes AcademySoftwareFoundation#604 ### Summarize your change. Added a post-install step in the BlackMagicDevice cmake file (bmd.cmake) to generate the DeckLinkAPI.h header file via midl.exe which is required to build the Blackmagic Video Output plugin on Windows. Note that the BlackMagic SDK only provides .idl files on Windows (not .h header files). Since that we are building OpenRV in a non managed way, we need to generate a DesktopLinkAPI.h header file from the provided .idl files. ### Describe the reason for the change. The Blackmagic Video Output plugin build on Windows was broken. ### Describe what you have tested and on which operating system. Successfully tested on Windows. Note that this commit is Windows specific so it should not impact any other OS. ### Add a list of changes, and note any that might need special attention during the review. ### If possible, provide screenshots. Signed-off-by: Bernard Laberge <[email protected]> Signed-off-by: Cédrik Fuoco <[email protected]>
1 parent a470377 commit 77f902b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

cmake/dependencies/bmd.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,16 @@ EXTERNALPROJECT_ADD(
5959
INSTALL_COMMAND ""
6060
)
6161

62+
# Generate the DeckLinkAPI.h file from DeckLinkAPI.idl provided with the DeckLink SDK
63+
IF(RV_TARGET_WINDOWS)
64+
EXTERNALPROJECT_ADD_STEP(
65+
${_target} post_install_step
66+
COMMAND midl.exe ARGS /header DeckLinkAPI.h /iid DeckLinkAPIDispatch.cpp DeckLinkAPI.idl
67+
WORKING_DIRECTORY ${_include_dir}
68+
DEPENDEES install
69+
)
70+
ENDIF()
71+
6272
ADD_LIBRARY(BlackmagicDeckLinkSDK INTERFACE)
6373
ADD_DEPENDENCIES(BlackmagicDeckLinkSDK ${_target})
6474
TARGET_INCLUDE_DIRECTORIES(

0 commit comments

Comments
 (0)