libdshowcapture.cmake 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. add_library(libdshowcapture INTERFACE)
  2. add_library(OBS::libdshowcapture ALIAS libdshowcapture)
  3. target_sources(
  4. libdshowcapture
  5. INTERFACE
  6. libdshowcapture/dshowcapture.hpp
  7. libdshowcapture/source/capture-filter.cpp
  8. libdshowcapture/source/capture-filter.hpp
  9. libdshowcapture/source/device-vendor.cpp
  10. libdshowcapture/source/device.cpp
  11. libdshowcapture/source/device.hpp
  12. libdshowcapture/source/dshow-base.cpp
  13. libdshowcapture/source/dshow-base.hpp
  14. libdshowcapture/source/dshow-demux.cpp
  15. libdshowcapture/source/dshow-demux.hpp
  16. libdshowcapture/source/dshow-device-defs.hpp
  17. libdshowcapture/source/dshow-encoded-device.cpp
  18. libdshowcapture/source/dshow-enum.cpp
  19. libdshowcapture/source/dshow-enum.hpp
  20. libdshowcapture/source/dshow-formats.cpp
  21. libdshowcapture/source/dshow-formats.hpp
  22. libdshowcapture/source/dshow-media-type.cpp
  23. libdshowcapture/source/dshow-media-type.hpp
  24. libdshowcapture/source/dshowcapture.cpp
  25. libdshowcapture/source/dshowencode.cpp
  26. libdshowcapture/source/encoder.cpp
  27. libdshowcapture/source/encoder.hpp
  28. libdshowcapture/source/external/IVideoCaptureFilter.h
  29. libdshowcapture/source/log.cpp
  30. libdshowcapture/source/log.hpp
  31. libdshowcapture/source/output-filter.cpp
  32. libdshowcapture/source/output-filter.hpp
  33. libdshowcapture/external/capture-device-support/Library/EGAVResult.cpp
  34. libdshowcapture/external/capture-device-support/Library/ElgatoUVCDevice.cpp
  35. libdshowcapture/external/capture-device-support/Library/win/EGAVHIDImplementation.cpp
  36. libdshowcapture/external/capture-device-support/SampleCode/DriverInterface.cpp
  37. )
  38. target_include_directories(
  39. libdshowcapture
  40. INTERFACE
  41. "${CMAKE_CURRENT_SOURCE_DIR}/libdshowcapture"
  42. "${CMAKE_CURRENT_SOURCE_DIR}/libdshowcapture/external/capture-device-support/Library"
  43. )
  44. target_compile_definitions(libdshowcapture INTERFACE _UP_WINDOWS=1)
  45. target_compile_options(libdshowcapture INTERFACE /wd4005 /wd4018)
  46. get_target_property(target_sources libdshowcapture INTERFACE_SOURCES)
  47. set(target_headers ${target_sources})
  48. set(target_external_sources ${target_sources})
  49. list(FILTER target_external_sources INCLUDE REGEX ".+external/.+/.+\\.cpp")
  50. list(FILTER target_sources EXCLUDE REGEX ".+external/.+/.+\\.cpp")
  51. list(FILTER target_sources INCLUDE REGEX ".*\\.(m|c[cp]?p?|swift)")
  52. list(FILTER target_headers INCLUDE REGEX ".*\\.h(pp)?")
  53. source_group("libdshowcapture-external\\Source Files" FILES ${target_external_sources})
  54. source_group("libdshowcapture\\Source Files" FILES ${target_sources})
  55. source_group("libdshowcapture\\Header Files" FILES ${target_headers})