2018-04-23 21:13:27 +02:00
|
|
|
cmake_minimum_required(VERSION 3.10)
|
|
|
|
project(MocIncludeRelaxed)
|
|
|
|
include("../AutogenTest.cmake")
|
2017-07-20 19:35:53 +02:00
|
|
|
|
2018-04-23 21:13:27 +02:00
|
|
|
# Test moc include patterns
|
2017-07-20 19:35:53 +02:00
|
|
|
set(CMAKE_AUTOMOC_RELAXED_MODE TRUE)
|
|
|
|
|
2018-01-26 17:06:56 +01:00
|
|
|
# Shared executable
|
|
|
|
set(MOC_INCLUDE_NAME "mocIncludeRelaxed")
|
2018-04-23 21:13:27 +02:00
|
|
|
include(${CMAKE_CURRENT_SOURCE_DIR}/../MocInclude/shared.cmake)
|
2017-07-20 19:35:53 +02:00
|
|
|
|
2018-01-26 17:06:56 +01:00
|
|
|
# Relaxed ony executable
|
|
|
|
add_executable(mocIncludeRelaxedOnly
|
|
|
|
RObjA.cpp
|
|
|
|
RObjB.cpp
|
|
|
|
RObjC.cpp
|
|
|
|
RMain.cpp
|
2017-07-20 19:35:53 +02:00
|
|
|
)
|
2018-01-26 17:06:56 +01:00
|
|
|
target_link_libraries(mocIncludeRelaxedOnly ${QT_LIBRARIES})
|
|
|
|
set_target_properties(mocIncludeRelaxedOnly PROPERTIES AUTOMOC ON)
|