CMakeLists.txt 804 B

123456789101112131415161718192021222324
  1. cmake_minimum_required(VERSION 3.7)
  2. if(POLICY CMP0079)
  3. cmake_policy(SET CMP0079 NEW)
  4. endif()
  5. if(WIN32)
  6. add_executable(datachannel-client-benchmark main.cpp parse_cl.cpp parse_cl.h getopt.cpp getopt.h)
  7. target_compile_definitions(datachannel-client-benchmark PUBLIC STATIC_GETOPT)
  8. else()
  9. add_executable(datachannel-client-benchmark main.cpp parse_cl.cpp parse_cl.h)
  10. endif()
  11. set_target_properties(datachannel-client-benchmark PROPERTIES
  12. CXX_STANDARD 17
  13. OUTPUT_NAME client-benchmark)
  14. target_link_libraries(datachannel-client-benchmark datachannel nlohmann_json)
  15. if(WIN32)
  16. add_custom_command(TARGET datachannel-client-benchmark POST_BUILD
  17. COMMAND ${CMAKE_COMMAND} -E copy_if_different
  18. "$<TARGET_FILE_DIR:datachannel>/datachannel.dll"
  19. $<TARGET_FILE_DIR:datachannel-client-benchmark>
  20. )
  21. endif()