mirror of
https://github.com/reactos/CMake.git
synced 2025-03-04 09:57:12 +00:00

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.
18 lines
502 B
CMake
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})
|