Debian Codegraph @

Tests/QtAutogen/GlobalAutogenExecutable/CMakeLists.txt

raw
1 cmake_minimum_required(VERSION 3.26)
2 project(GlobalAutogenExecutable)
3
4 include("../AutogenCoreTest.cmake")
5
6 set(test_automoc_path "global_automoc_exe_path")
7 set(test_autouic_path "global_autouic_exe_path")
8 set(test_autorcc_path "global_autorcc_exe_path")
9
10 set(CMAKE_AUTOMOC_EXECUTABLE ${test_automoc_path})
11 set(CMAKE_AUTOUIC_EXECUTABLE ${test_autouic_path})
12 set(CMAKE_AUTORCC_EXECUTABLE ${test_autorcc_path})
13
14 add_executable(autogen_test main.cpp)
15
16 get_target_property(target_automoc_path autogen_test AUTOMOC_EXECUTABLE)
17 get_target_property(target_autouic_path autogen_test AUTOUIC_EXECUTABLE)
18 get_target_property(target_autorcc_path autogen_test AUTORCC_EXECUTABLE)
19
20 if(NOT ${target_automoc_path} STREQUAL ${test_automoc_path})
21 message(FATAL_ERROR "CMAKE_AUTOMOC_EXECUTABLE not set")
22 endif()
23
24 if (NOT ${target_autouic_path} STREQUAL ${test_autouic_path})
25 message(FATAL_ERROR "CMAKE_AUTOUIC_EXECUTABLE not set")
26 endif()
27
28 if (NOT ${target_autorcc_path} STREQUAL ${test_autorcc_path})
29 message(FATAL_ERROR "CMAKE_AUTORCC_EXECUTABLE not set")
30 endif()