CMakeLists.txt 820 B

123456789101112131415161718192021222324252627282930313233343536
  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. doctest_discover_tests(${TARGET_NAME})
  23. if(EMSCRIPTEN)
  24. # The benchmarks additionally use data from the benchmark sample.
  25. target_link_libraries(${TARGET_NAME} "--preload-file \"${PROJECT_SOURCE_DIR}/Samples/basic/benchmark/data/@/Samples/basic/benchmark/data/\"")
  26. endif()
  27. if(MSVC)
  28. # Set UTF-8 on MSVC to properly encode non-ascii characters.
  29. target_compile_options(${TARGET_NAME} PRIVATE /utf-8)
  30. endif()