2022-02-07 17:35:25 +01:00
|
|
|
qt_wrap_cpp(test-translationhandler_SRC testtranslationhandler.h ${CMAKE_SOURCE_DIR}/gui/translationhandler.h)
|
2021-12-17 21:49:32 +01:00
|
|
|
add_custom_target(build-translationhandler-deps SOURCES ${test-translationhandler_SRC})
|
|
|
|
add_dependencies(gui-build-deps build-translationhandler-deps)
|
|
|
|
add_executable(test-translationhandler
|
|
|
|
${test-translationhandler_SRC}
|
|
|
|
testtranslationhandler.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/gui/common.cpp
|
|
|
|
${CMAKE_SOURCE_DIR}/gui/translationhandler.cpp
|
|
|
|
)
|
2022-05-15 12:42:29 +02:00
|
|
|
target_include_directories(test-translationhandler PRIVATE ${CMAKE_SOURCE_DIR}/gui ${CMAKE_SOURCE_DIR}/lib)
|
2022-03-13 20:07:58 +01:00
|
|
|
target_link_libraries(test-translationhandler ${QT_CORE_LIB} ${QT_WIDGETS_LIB} ${QT_TEST_LIB})
|
|
|
|
|
|
|
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
|
|
# Q_UNUSED() in generated code
|
2023-01-27 19:43:08 +01:00
|
|
|
target_compile_options_safe(test-translationhandler -Wno-extra-semi-stmt)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (REGISTER_GUI_TESTS)
|
|
|
|
# TODO: requires X session
|
|
|
|
#add_test(NAME test-translationhandler COMMAND $<TARGET_FILE:test-translationhandler>)
|
2022-03-13 20:07:58 +01:00
|
|
|
endif()
|