Warning, /games/libkdegames/src/carddecks/tools/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 # SPDX-FileCopyrightText: 2023 Friedrich W. H. Kossebau <kossebau@kde.org>
0002 #
0003 # SPDX-License-Identifier: BSD-3-Clause
0004
0005 add_executable(renderelement renderelement.cpp)
0006 target_link_libraries(renderelement Qt::Svg)
0007
0008 # setup generral renderig check target
0009 add_custom_target(check_rendering)
0010
0011 function(list_with_rendering_check id old_file new_file)
0012 # symbolic target for cheking this file, always outdated
0013 set(check_rendering_output "check_rendering_${old_file}")
0014 set_property(SOURCE ${check_rendering_output} PROPERTY SYMBOLIC 1)
0015
0016 add_custom_command(
0017 OUTPUT ${check_rendering_output}
0018 COMMAND ${CMAKE_COMMAND}
0019 ARGS
0020 "-DID=${id}"
0021 "-DWORKING_DIR=${CMAKE_CURRENT_BINARY_DIR}"
0022 "-DCOMPARE=${ImageMagick_compare_EXECUTABLE}"
0023 "-DRENDERELEMENT=$<TARGET_FILE:renderelement>"
0024 "-DOLD_FILE=${CMAKE_CURRENT_SOURCE_DIR}/${old_file}"
0025 "-DNEW_FILE=${new_file}"
0026 -P ${CMAKE_CURRENT_SOURCE_DIR}/tools/CompareSVGs.cmake
0027 COMMENT "Checking SVG of ${id}"
0028 )
0029
0030 # add to general target
0031 set(target_check_rendering_output "check_rendering_${id}")
0032 add_custom_target(${target_check_rendering_output} DEPENDS ${check_rendering_output})
0033 add_dependencies(check_rendering ${target_check_rendering_output})
0034 endfunction()