CMakeLists.txt 779 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. cmake_minimum_required(VERSION 3.7)
  2. if(POLICY CMP0079)
  3. cmake_policy(SET CMP0079 NEW)
  4. endif()
  5. add_executable(streamer
  6. main.cpp
  7. dispatchqueue.cpp
  8. dispatchqueue.hpp
  9. h264fileparser.cpp
  10. h264fileparser.hpp
  11. helpers.cpp
  12. helpers.hpp
  13. opusfileparser.cpp
  14. opusfileparser.hpp
  15. fileparser.cpp
  16. fileparser.hpp
  17. stream.cpp
  18. stream.hpp
  19. ArgParser.cpp
  20. ArgParser.hpp
  21. )
  22. if(WIN32)
  23. target_compile_definitions(streamer PUBLIC STATIC_GETOPT)
  24. endif()
  25. set_target_properties(streamer PROPERTIES
  26. CXX_STANDARD 17
  27. OUTPUT_NAME streamer)
  28. target_link_libraries(streamer datachannel nlohmann_json)
  29. if(WIN32)
  30. add_custom_command(TARGET streamer POST_BUILD
  31. COMMAND ${CMAKE_COMMAND} -E copy_if_different
  32. "$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
  33. $<TARGET_FILE_DIR:streamer>
  34. )
  35. endif()