Sebastian Holtermann 2ef640819f Autogen: Tests: Differentiate between Qt core and Qt gui tests
Some AUTOGEN tests require the Qt core libraries only and
some require the Qt gui libraries to function.
This replaces the AutogenTest.cmake script with two specific
AutogenCoreTest.cmake and AutogenGuiTest.cmake scripts that
are included on demand.
2018-11-28 12:51:19 +01:00

18 lines
502 B
CMake

cmake_minimum_required(VERSION 3.10)
project(MocMacroName)
include("../AutogenCoreTest.cmake")
# Test CMAKE_AUTOMOC_MACRO_NAMES and AUTOMOC_MACRO_NAMES
list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "QO1_ALIAS")
add_executable(mocMacroName
main.cpp
Gadget.cpp
Object.cpp
Object1Aliased.cpp
Object2Aliased.cpp
)
set_property(TARGET mocMacroName PROPERTY AUTOMOC ON)
set_property(TARGET mocMacroName APPEND PROPERTY AUTOMOC_MACRO_NAMES "QO2_ALIAS")
target_link_libraries(mocMacroName ${QT_LIBRARIES})