CMakeLists.txt 856 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. set(TARGET_NAME "rmlui_benchmarks")
  2. add_executable(${TARGET_NAME}
  3. DataExpression.cpp
  4. Element.cpp
  5. BackgroundBorder.cpp
  6. ElementDocument.cpp
  7. Table.cpp
  8. Selectors.cpp
  9. main.cpp
  10. DataBinding.cpp
  11. Flexbox.cpp
  12. FontEffect.cpp
  13. WidgetTextInput.cpp
  14. )
  15. set_common_target_options(${TARGET_NAME})
  16. target_link_libraries(${TARGET_NAME} PRIVATE
  17. rmlui_tests_common
  18. rmlui_core
  19. doctest::doctest
  20. nanobench::nanobench
  21. )
  22. if(NOT EMSCRIPTEN)
  23. doctest_discover_tests(${TARGET_NAME})
  24. endif()
  25. if(EMSCRIPTEN)
  26. # The benchmarks additionally use data from the benchmark sample.
  27. target_link_libraries(${TARGET_NAME} PRIVATE "--preload-file \"${PROJECT_SOURCE_DIR}/Samples/basic/benchmark/data/@/Samples/basic/benchmark/data/\"")
  28. endif()
  29. if(MSVC)
  30. # Set UTF-8 on MSVC to properly encode non-ascii characters.
  31. target_compile_options(${TARGET_NAME} PRIVATE /utf-8)
  32. endif()