CMakeLists.txt 878 B

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