CMake/Tests/QtAutogen/RccSkipSource/CMakeLists.txt
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

24 lines
819 B
CMake

cmake_minimum_required(VERSION 3.10)
project(RccSkipSource)
include("../AutogenCoreTest.cmake")
# Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target
set(skipRccSources
skipRcc.cpp
skipRccBad1.qrc
skipRccBad2.qrc
skipRccGood.qrc
)
set_property(SOURCE skipRccBad1.qrc PROPERTY SKIP_AUTORCC ON)
set_property(SOURCE skipRccBad2.qrc PROPERTY SKIP_AUTOGEN ON)
# AUTORCC enabled
add_executable(skipRccA ${skipRccSources})
set_property(TARGET skipRccA PROPERTY AUTORCC ON)
target_link_libraries(skipRccA ${QT_LIBRARIES})
# AUTORCC, AUTOUIC and AUTOMOC enabled
add_executable(skipRccB ${skipRccSources})
set_property(TARGET skipRccB PROPERTY AUTORCC ON)
set_property(TARGET skipRccB PROPERTY AUTOUIC ON)
set_property(TARGET skipRccB PROPERTY AUTOMOC ON)
target_link_libraries(skipRccB ${QT_LIBRARIES})