-nageru_srcs += ['nageru/decklink_capture.cpp', 'nageru/decklink_util.cpp', 'nageru/decklink_output.cpp',
- 'nageru/decklink/DeckLinkAPIDispatch.cpp']
-decklink_dir = include_directories('nageru/decklink')
+decklink_dir = include_directories('nageru/decklink', is_system: true)
+decklink_lib = static_library('decklink', 'nageru/decklink/DeckLinkAPIDispatch.cpp', include_directories: decklink_dir, cpp_args: '-w')
+nageru_link_with += decklink_lib
+
+nageru_srcs += ['nageru/decklink_capture.cpp', 'nageru/decklink_util.cpp', 'nageru/decklink_output.cpp']