Warning, /frameworks/kquickcharts/autotests/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2019,2020 Arjen Hiemstra <ahiemstra@heimr.nl> 0002 # SPDX-FileCopyrightText: 2022 Alexander Lohnau <alexander.lohnau@gmx.de> 0003 # SPDX-License-Identifier: BSD-2-Clause 0004 find_package(Qt${QT_MAJOR_VERSION} COMPONENTS QuickTest) 0005 0006 include(ECMAddTests) 0007 0008 include_directories(${CMAKE_SOURCE_DIR}/src) 0009 0010 ecm_add_tests( 0011 ArraySourceTest.cpp 0012 MapProxySourceTest.cpp 0013 HistoryProxySourceTest.cpp 0014 ItemBuilderTest.cpp 0015 LINK_LIBRARIES QuickChartsStatic Qt${QT_MAJOR_VERSION}::Test 0016 ) 0017 0018 add_executable(qmltest qmltest.cpp) 0019 target_link_libraries(qmltest Qt${QT_MAJOR_VERSION}::QuickTest) 0020 if (NOT BUILD_SHARED_LIBS) 0021 target_link_libraries(qmltest QuickCharts) 0022 target_compile_definitions(qmltest PRIVATE -DIMPORT_KQUICKCHARTS_QML_PLUGIN) 0023 endif() 0024 0025 macro(add_qml_tests) 0026 if (WIN32) 0027 set(_extra_args -platform offscreen) 0028 endif() 0029 0030 foreach(test ${ARGV}) 0031 add_test(NAME ${test} 0032 COMMAND ${CMAKE_BINARY_DIR}/bin/qmltest 0033 ${_extra_args} 0034 -import ${CMAKE_BINARY_DIR}/bin 0035 -input ${test} 0036 WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 0037 ) 0038 endforeach() 0039 endmacro() 0040 0041 add_qml_tests( 0042 tst_BarChart.qml 0043 tst_LineChart.qml 0044 tst_PieChart.qml 0045 ) 0046 0047 find_program(GLSL_VALIDATOR NAMES glslangValidator) 0048 if (GLSL_VALIDATOR) 0049 add_test( 0050 NAME ShaderValidation 0051 COMMAND ${CMAKE_SOURCE_DIR}/scripts/validate_shaders.sh ${CMAKE_SOURCE_DIR}/src/shaders 0052 ) 0053 else() 0054 message(WARNING "glslangValidator not found, cannot validate shaders") 0055 endif()