CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. cmake_minimum_required(VERSION 3.7)
  2. set(OFFERER_UWP_RESOURCES
  3. uwp/offerer/Logo.png
  4. uwp/offerer/package.appxManifest
  5. uwp/offerer/SmallLogo.png
  6. uwp/offerer/SmallLogo44x44.png
  7. uwp/offerer/SplashScreen.png
  8. uwp/offerer/StoreLogo.png
  9. uwp/offerer/Windows_TemporaryKey.pfx
  10. )
  11. set(ANSWERER_UWP_RESOURCES
  12. uwp/answerer/Logo.png
  13. uwp/answerer/package.appxManifest
  14. uwp/answerer/SmallLogo.png
  15. uwp/answerer/SmallLogo44x44.png
  16. uwp/answerer/SplashScreen.png
  17. uwp/answerer/StoreLogo.png
  18. uwp/answerer/Windows_TemporaryKey.pfx
  19. )
  20. if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
  21. add_executable(datachannel-copy-paste-offerer offerer.cpp ${OFFERER_UWP_RESOURCES})
  22. else()
  23. add_executable(datachannel-copy-paste-offerer offerer.cpp)
  24. endif()
  25. set_target_properties(datachannel-copy-paste-offerer PROPERTIES
  26. CXX_STANDARD 17
  27. OUTPUT_NAME offerer)
  28. set_target_properties(datachannel-copy-paste-offerer PROPERTIES
  29. XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.github.paullouisageneau.libdatachannel.examples.copypaste.offerer)
  30. target_link_libraries(datachannel-copy-paste-offerer datachannel)
  31. if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
  32. add_executable(datachannel-copy-paste-answerer answerer.cpp ${ANSWERER_UWP_RESOURCES})
  33. else()
  34. add_executable(datachannel-copy-paste-answerer answerer.cpp)
  35. endif()
  36. set_target_properties(datachannel-copy-paste-answerer PROPERTIES
  37. CXX_STANDARD 17
  38. OUTPUT_NAME answerer)
  39. set_target_properties(datachannel-copy-paste-answerer PROPERTIES
  40. XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER com.github.paullouisageneau.libdatachannel.examples.copypaste.answerer)
  41. target_link_libraries(datachannel-copy-paste-answerer datachannel)
  42. if(WIN32)
  43. add_custom_command(TARGET datachannel-copy-paste-offerer POST_BUILD
  44. COMMAND ${CMAKE_COMMAND} -E copy_if_different
  45. "$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
  46. $<TARGET_FILE_DIR:datachannel-copy-paste-offerer>
  47. )
  48. add_custom_command(TARGET datachannel-copy-paste-answerer POST_BUILD
  49. COMMAND ${CMAKE_COMMAND} -E copy_if_different
  50. "$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
  51. $<TARGET_FILE_DIR:datachannel-copy-paste-answerer>
  52. )
  53. endif()