Debian Codegraph @

tests/acceptance-tests/wayland-generator/CMakeLists.txt

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 set(GENERATED_HEADER "${CMAKE_CURRENT_BINARY_DIR}/generated.h")
2 set(GENERATED_SRC "${CMAKE_CURRENT_BINARY_DIR}/generated.cpp")
3 set(PROTOCOL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/protocol.xml")
4 add_custom_command(
5 OUTPUT "${GENERATED_HEADER}" "${GENERATED_SRC}"
6 VERBATIM
7 COMMAND "sh" "-c"
8 "${CMAKE_BINARY_DIR}/bin/mir_wayland_generator wl_ ${PROTOCOL_PATH} header > ${GENERATED_HEADER}"
9 COMMAND "sh" "-c"
10 "${CMAKE_BINARY_DIR}/bin/mir_wayland_generator wl_ ${PROTOCOL_PATH} source > ${GENERATED_SRC}"
11 DEPENDS mir_wayland_generator "${PROTOCOL_PATH}"
12 )
13 add_custom_target(wayland_generator_test_generated_files ALL DEPENDS "${GENERATED_SRC}" "${GENERATED_HEADER}")
14
15 set(EXPECTED_HEADER "${CMAKE_CURRENT_SOURCE_DIR}/expected.h")
16 set(EXPECTED_SRC "${CMAKE_CURRENT_SOURCE_DIR}/expected.cpp")
17 set(TEST_SCRIPT "${CMAKE_BINARY_DIR}/bin/test_wayland_generator.sh")
18 configure_file("test_wayland_generator.sh.in" "${TEST_SCRIPT}" @ONLY)
19 configure_file("update_wayland_generator_test.sh.in" "${CMAKE_BINARY_DIR}/bin/update_wayland_generator_test.sh" @ONLY)
20
21 mir_add_test(NAME test_wayland_generator COMMAND "${TEST_SCRIPT}")