diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2018-11-27 11:41:20 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2018-11-28 11:51:19 (GMT) |
commit | 2ef640819fcf9ca741b3ebcb543b9a01ffb40689 (patch) | |
tree | 22c385086aa71e29601caba27d94593ea642407b /Tests/QtAutogen | |
parent | b736f5f269a1d04532901326304597a284af2c70 (diff) | |
download | CMake-2ef640819fcf9ca741b3ebcb543b9a01ffb40689.zip CMake-2ef640819fcf9ca741b3ebcb543b9a01ffb40689.tar.gz CMake-2ef640819fcf9ca741b3ebcb543b9a01ffb40689.tar.bz2 |
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.
Diffstat (limited to 'Tests/QtAutogen')
43 files changed, 103 insertions, 46 deletions
diff --git a/Tests/QtAutogen/AutogenCoreTest.cmake b/Tests/QtAutogen/AutogenCoreTest.cmake new file mode 100644 index 0000000..5803859 --- /dev/null +++ b/Tests/QtAutogen/AutogenCoreTest.cmake @@ -0,0 +1,55 @@ + +# Tell find_package(Qt5) where to find Qt. +if(QT_QMAKE_EXECUTABLE) + get_filename_component(Qt_BIN_DIR "${QT_QMAKE_EXECUTABLE}" PATH) + get_filename_component(Qt_PREFIX_DIR "${Qt_BIN_DIR}" PATH) + list(APPEND CMAKE_PREFIX_PATH ${Qt_PREFIX_DIR}) +endif() + +if (QT_TEST_VERSION EQUAL 4) + + find_package(Qt4 REQUIRED QtCore) + include(UseQt4) + + set(QT_QTCORE_TARGET Qt4::QtCore) + + # Qt macros + macro(qtx_wrap_cpp) + qt4_wrap_cpp(${ARGN}) + endmacro() + macro(qtx_generate_moc) + qt4_generate_moc(${ARGN}) + endmacro() + +elseif(QT_TEST_VERSION EQUAL 5) + + find_package(Qt5Core REQUIRED) + + set(QT_QTCORE_TARGET Qt5::Core) + set(QT_LIBRARIES Qt5::Core) + + # Include directories + include_directories(${Qt5Core_INCLUDE_DIRS}) + + # Definitions + if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC) + add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC}) + endif() + + # Qt macros + macro(qtx_wrap_cpp) + qt5_wrap_cpp(${ARGN}) + endmacro() + macro(qtx_generate_moc) + qt5_generate_moc(${ARGN}) + endmacro() + +else() + message(SEND_ERROR "Invalid Qt version specified: ${QT_TEST_VERSION}") +endif() + +# Get Qt compile features +get_property(QT_COMPILE_FEATURES + TARGET ${QT_QTCORE_TARGET} + PROPERTY INTERFACE_COMPILE_FEATURES +) diff --git a/Tests/QtAutogen/AutogenTest.cmake b/Tests/QtAutogen/AutogenGuiTest.cmake index 3969a89..b76d341 100644 --- a/Tests/QtAutogen/AutogenTest.cmake +++ b/Tests/QtAutogen/AutogenGuiTest.cmake @@ -7,11 +7,11 @@ if(QT_QMAKE_EXECUTABLE) endif() if (QT_TEST_VERSION EQUAL 4) + find_package(Qt4 REQUIRED) include(UseQt4) set(QT_QTCORE_TARGET Qt4::QtCore) - set(QT_QTGUI_TARGET Qt4::QtGui) # Qt macros macro(qtx_wrap_cpp) @@ -22,14 +22,16 @@ if (QT_TEST_VERSION EQUAL 4) endmacro() elseif(QT_TEST_VERSION EQUAL 5) + find_package(Qt5Widgets REQUIRED) set(QT_QTCORE_TARGET Qt5::Core) - set(QT_QTGUI_TARGET Qt5::Widgets) + set(QT_LIBRARIES Qt5::Widgets) + # Include directories include_directories(${Qt5Widgets_INCLUDE_DIRS}) - set(QT_LIBRARIES Qt5::Widgets) + # Definitions if(Qt5_POSITION_INDEPENDENT_CODE AND CMAKE_CXX_COMPILE_OPTIONS_PIC) add_definitions(${CMAKE_CXX_COMPILE_OPTIONS_PIC}) endif() diff --git a/Tests/QtAutogen/AutogenOriginDependsOff/CMakeLists.txt b/Tests/QtAutogen/AutogenOriginDependsOff/CMakeLists.txt index 1c2271a..9e6fe8b 100644 --- a/Tests/QtAutogen/AutogenOriginDependsOff/CMakeLists.txt +++ b/Tests/QtAutogen/AutogenOriginDependsOff/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.11) project(AutogenOriginDependsOff) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") set(CSD ${CMAKE_CURRENT_SOURCE_DIR}) set(CBD ${CMAKE_CURRENT_BINARY_DIR}) diff --git a/Tests/QtAutogen/AutogenOriginDependsOn/CMakeLists.txt b/Tests/QtAutogen/AutogenOriginDependsOn/CMakeLists.txt index 60869eb..5aabe0e 100644 --- a/Tests/QtAutogen/AutogenOriginDependsOn/CMakeLists.txt +++ b/Tests/QtAutogen/AutogenOriginDependsOn/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(AutogenOriginDependsOn) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(CSD ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Tests/QtAutogen/AutogenTargetDepends/CMakeLists.txt b/Tests/QtAutogen/AutogenTargetDepends/CMakeLists.txt index 63b7c98..492b5db 100644 --- a/Tests/QtAutogen/AutogenTargetDepends/CMakeLists.txt +++ b/Tests/QtAutogen/AutogenTargetDepends/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(AutogenTargetDepends) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(CSD ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Tests/QtAutogen/Complex/CMakeLists.txt b/Tests/QtAutogen/Complex/CMakeLists.txt index a18cc04..d9fdf5c 100644 --- a/Tests/QtAutogen/Complex/CMakeLists.txt +++ b/Tests/QtAutogen/Complex/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(Complex) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # -- Test: AUTOMOC AUTORCC AUTOUIC add_definitions(-DFOO -DSomeDefine="Barx") diff --git a/Tests/QtAutogen/GlobalAutogenTarget/CMakeLists.txt b/Tests/QtAutogen/GlobalAutogenTarget/CMakeLists.txt index e020673..cff7022 100644 --- a/Tests/QtAutogen/GlobalAutogenTarget/CMakeLists.txt +++ b/Tests/QtAutogen/GlobalAutogenTarget/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.12) project(GlobalAutogenTarget) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # This tests # CMAKE_GLOBAL_AUTOGEN_TARGET, diff --git a/Tests/QtAutogen/GlobalAutogenTarget/GAT/CMakeLists.txt b/Tests/QtAutogen/GlobalAutogenTarget/GAT/CMakeLists.txt index b1008e8..3925197 100644 --- a/Tests/QtAutogen/GlobalAutogenTarget/GAT/CMakeLists.txt +++ b/Tests/QtAutogen/GlobalAutogenTarget/GAT/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.12) project(GAT) -include("../../AutogenTest.cmake") +include("../../AutogenCoreTest.cmake") # Include directories include_directories(${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/Tests/QtAutogen/LowMinimumVersion/CMakeLists.txt b/Tests/QtAutogen/LowMinimumVersion/CMakeLists.txt index a6ac338..e1af3d8 100644 --- a/Tests/QtAutogen/LowMinimumVersion/CMakeLists.txt +++ b/Tests/QtAutogen/LowMinimumVersion/CMakeLists.txt @@ -1,7 +1,7 @@ # Use a low minimum version cmake_minimum_required(VERSION 3.0) project(LowMinimumVersion) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOUIC ON) diff --git a/Tests/QtAutogen/MacOsFW/CMakeLists.txt b/Tests/QtAutogen/MacOsFW/CMakeLists.txt index 26d2019..c08efc4 100644 --- a/Tests/QtAutogen/MacOsFW/CMakeLists.txt +++ b/Tests/QtAutogen/MacOsFW/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MacOsFW) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") find_package(Qt5Test REQUIRED) diff --git a/Tests/QtAutogen/MocCMP0071/CMakeLists.txt b/Tests/QtAutogen/MocCMP0071/CMakeLists.txt index a79f36e..5c58a82 100644 --- a/Tests/QtAutogen/MocCMP0071/CMakeLists.txt +++ b/Tests/QtAutogen/MocCMP0071/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MocCMP0071) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") add_subdirectory(OLD) add_subdirectory(NEW) diff --git a/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt b/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt index 1ad6238..8b4da34 100644 --- a/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt +++ b/Tests/QtAutogen/MocIncludeRelaxed/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MocIncludeRelaxed) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Test moc include patterns set(CMAKE_AUTOMOC_RELAXED_MODE TRUE) diff --git a/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt b/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt index 2cf0fed..d0aaebf 100644 --- a/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt +++ b/Tests/QtAutogen/MocIncludeStrict/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MocIncludeStrict) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Test moc include patterns set(CMAKE_AUTOMOC_RELAXED_MODE FALSE) diff --git a/Tests/QtAutogen/MocMacroName/CMakeLists.txt b/Tests/QtAutogen/MocMacroName/CMakeLists.txt index f0251a2..bf13d18 100644 --- a/Tests/QtAutogen/MocMacroName/CMakeLists.txt +++ b/Tests/QtAutogen/MocMacroName/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MocMacroName) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Test CMAKE_AUTOMOC_MACRO_NAMES and AUTOMOC_MACRO_NAMES list(APPEND CMAKE_AUTOMOC_MACRO_NAMES "QO1_ALIAS") diff --git a/Tests/QtAutogen/MocOnly/CMakeLists.txt b/Tests/QtAutogen/MocOnly/CMakeLists.txt index 5377728..e109154 100644 --- a/Tests/QtAutogen/MocOnly/CMakeLists.txt +++ b/Tests/QtAutogen/MocOnly/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MocOnly) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") add_executable(mocOnly main.cpp diff --git a/Tests/QtAutogen/MocOptions/CMakeLists.txt b/Tests/QtAutogen/MocOptions/CMakeLists.txt index f64b37b..19ee658 100644 --- a/Tests/QtAutogen/MocOptions/CMakeLists.txt +++ b/Tests/QtAutogen/MocOptions/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MocOptions) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Test extra options passed to moc via AUTOMOC_MOC_OPTIONS add_executable(mocOptions Object.cpp main.cpp) diff --git a/Tests/QtAutogen/MocOsMacros/CMakeLists.txt b/Tests/QtAutogen/MocOsMacros/CMakeLists.txt index e7b670e..b0125f6 100644 --- a/Tests/QtAutogen/MocOsMacros/CMakeLists.txt +++ b/Tests/QtAutogen/MocOsMacros/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.11) project(MocOsMacros) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Tests if moc processes Q_OS_XXX macros diff --git a/Tests/QtAutogen/MocSkipSource/CMakeLists.txt b/Tests/QtAutogen/MocSkipSource/CMakeLists.txt index 8d1fa6a..454e896 100644 --- a/Tests/QtAutogen/MocSkipSource/CMakeLists.txt +++ b/Tests/QtAutogen/MocSkipSource/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MocSkipSource) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Test for SKIP_AUTOMOC and SKIP_AUTOGEN on an AUTOMOC enabled target diff --git a/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt index 088a24c..ec204e7 100644 --- a/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt +++ b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(ObjectLibrary) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) diff --git a/Tests/QtAutogen/Parallel/CMakeLists.txt b/Tests/QtAutogen/Parallel/CMakeLists.txt index 9c64804..299bcbf 100644 --- a/Tests/QtAutogen/Parallel/CMakeLists.txt +++ b/Tests/QtAutogen/Parallel/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(Parallel) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test different values for AUTOGEN_PARALLEL include("../Parallel/parallel.cmake") diff --git a/Tests/QtAutogen/Parallel1/CMakeLists.txt b/Tests/QtAutogen/Parallel1/CMakeLists.txt index 9c0b4e5..5c7d547 100644 --- a/Tests/QtAutogen/Parallel1/CMakeLists.txt +++ b/Tests/QtAutogen/Parallel1/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(Parallel1) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test different values for AUTOGEN_PARALLEL include("../Parallel/parallel.cmake") diff --git a/Tests/QtAutogen/Parallel2/CMakeLists.txt b/Tests/QtAutogen/Parallel2/CMakeLists.txt index 74c38f1..668aea4 100644 --- a/Tests/QtAutogen/Parallel2/CMakeLists.txt +++ b/Tests/QtAutogen/Parallel2/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(Parallel2) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test different values for AUTOGEN_PARALLEL include("../Parallel/parallel.cmake") diff --git a/Tests/QtAutogen/Parallel3/CMakeLists.txt b/Tests/QtAutogen/Parallel3/CMakeLists.txt index c735531..5c50f5e 100644 --- a/Tests/QtAutogen/Parallel3/CMakeLists.txt +++ b/Tests/QtAutogen/Parallel3/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(Parallel3) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test different values for AUTOGEN_PARALLEL include("../Parallel/parallel.cmake") diff --git a/Tests/QtAutogen/Parallel4/CMakeLists.txt b/Tests/QtAutogen/Parallel4/CMakeLists.txt index c012ccd..2c40c6a 100644 --- a/Tests/QtAutogen/Parallel4/CMakeLists.txt +++ b/Tests/QtAutogen/Parallel4/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(Parallel4) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test different values for AUTOGEN_PARALLEL include("../Parallel/parallel.cmake") diff --git a/Tests/QtAutogen/ParallelAUTO/CMakeLists.txt b/Tests/QtAutogen/ParallelAUTO/CMakeLists.txt index 3fd3ebc..cddece3 100644 --- a/Tests/QtAutogen/ParallelAUTO/CMakeLists.txt +++ b/Tests/QtAutogen/ParallelAUTO/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(ParallelAUTO) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test different values for AUTOGEN_PARALLEL include("../Parallel/parallel.cmake") diff --git a/Tests/QtAutogen/RccEmpty/CMakeLists.txt b/Tests/QtAutogen/RccEmpty/CMakeLists.txt index 3b16edc..a8e2af1 100644 --- a/Tests/QtAutogen/RccEmpty/CMakeLists.txt +++ b/Tests/QtAutogen/RccEmpty/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(RccEmpty) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Test AUTORCC on a .qrc file with no resource files add_executable(rccEmpty rccEmpty.cpp rccEmptyRes.qrc) diff --git a/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt b/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt index 7f7432e..61b9601 100644 --- a/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt +++ b/Tests/QtAutogen/RccOffMocLibrary/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(RccOffMocLibrary) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Add not_generated_file.qrc to the source list to get the file-level # dependency, but don't generate a c++ file from it. Disable the AUTORCC diff --git a/Tests/QtAutogen/RccOnly/CMakeLists.txt b/Tests/QtAutogen/RccOnly/CMakeLists.txt index a65dee4..f3776f5 100644 --- a/Tests/QtAutogen/RccOnly/CMakeLists.txt +++ b/Tests/QtAutogen/RccOnly/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(RccOnly) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Test AUTORCC being enabled only add_executable(rccOnly rccOnly.cpp rccOnlyRes.qrc) diff --git a/Tests/QtAutogen/RccSkipSource/CMakeLists.txt b/Tests/QtAutogen/RccSkipSource/CMakeLists.txt index f8a8032..4223274 100644 --- a/Tests/QtAutogen/RccSkipSource/CMakeLists.txt +++ b/Tests/QtAutogen/RccSkipSource/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(RccSkipSource) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Test for SKIP_AUTORCC and SKIP_AUTOGEN on an AUTORCC enabled target set(skipRccSources diff --git a/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt b/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt index 6fad80c..f4b726f 100644 --- a/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt +++ b/Tests/QtAutogen/RerunMocBasic/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(RerunMocBasic) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Dummy executable to generate a clean target add_executable(dummy dummy.cpp) diff --git a/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt b/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt index cec60a4..6a9f550 100644 --- a/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt +++ b/Tests/QtAutogen/RerunMocBasic/MocBasic/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MocBasic) -include("../../AutogenTest.cmake") +include("../../AutogenCoreTest.cmake") set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) diff --git a/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt index b5287c1..b83e994 100644 --- a/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt +++ b/Tests/QtAutogen/RerunMocPlugin/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(RerunMocPlugin) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Tests Q_PLUGIN_METADATA and CMAKE_AUTOMOC_DEPEND_FILTERS # json file change detection diff --git a/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt index ca22aeb..5068289 100644 --- a/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt +++ b/Tests/QtAutogen/RerunMocPlugin/MocPlugin/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(MocPlugin) -include("../../AutogenTest.cmake") +include("../../AutogenGuiTest.cmake") if (QT_TEST_VERSION LESS 5) message(SEND_ERROR "Qt 5 or higher required.") diff --git a/Tests/QtAutogen/RerunRccConfigChange/CMakeLists.txt b/Tests/QtAutogen/RerunRccConfigChange/CMakeLists.txt index 4dc24fe..dcb7a79 100644 --- a/Tests/QtAutogen/RerunRccConfigChange/CMakeLists.txt +++ b/Tests/QtAutogen/RerunRccConfigChange/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.11.2) project(RerunRccConfigChange) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Tests rcc rebuilding after a configuration change diff --git a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/CMakeLists.txt b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/CMakeLists.txt index 3cddf5c..e2dd0ac 100644 --- a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/CMakeLists.txt +++ b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.11.2) project(RccConfigChange) -include("../../AutogenTest.cmake") +include("../../AutogenCoreTest.cmake") # Enable AUTORCC for all targets set(CMAKE_AUTORCC ON) diff --git a/Tests/QtAutogen/RerunRccDepends/CMakeLists.txt b/Tests/QtAutogen/RerunRccDepends/CMakeLists.txt index 4268de2..80c5cf0 100644 --- a/Tests/QtAutogen/RerunRccDepends/CMakeLists.txt +++ b/Tests/QtAutogen/RerunRccDepends/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(RerunRccDepends) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Tests rcc rebuilding when a resource file changes diff --git a/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt b/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt index 0507e61..150f849 100644 --- a/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt +++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(RccDepends) -include("../../AutogenTest.cmake") +include("../../AutogenCoreTest.cmake") # Enable AUTORCC for all targets set(CMAKE_AUTORCC ON) diff --git a/Tests/QtAutogen/SameName/CMakeLists.txt b/Tests/QtAutogen/SameName/CMakeLists.txt index 931e40f..6d42499 100644 --- a/Tests/QtAutogen/SameName/CMakeLists.txt +++ b/Tests/QtAutogen/SameName/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(SameName) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test AUTOMOC and AUTORCC on source files with the same name # but in different subdirectories diff --git a/Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt b/Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt index 0c2f987..f3536ba 100644 --- a/Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt +++ b/Tests/QtAutogen/StaticLibraryCycle/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(StaticLibraryCycle) -include("../AutogenTest.cmake") +include("../AutogenCoreTest.cmake") # Test AUTOMOC on cyclic static libraries diff --git a/Tests/QtAutogen/UicInclude/CMakeLists.txt b/Tests/QtAutogen/UicInclude/CMakeLists.txt index 56f76fb..929868b 100644 --- a/Tests/QtAutogen/UicInclude/CMakeLists.txt +++ b/Tests/QtAutogen/UicInclude/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(UicInclude) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test uic include patterns set(CMAKE_AUTOUIC_SEARCH_PATHS "dirA") diff --git a/Tests/QtAutogen/UicInterface/CMakeLists.txt b/Tests/QtAutogen/UicInterface/CMakeLists.txt index e0421a2..e022764 100644 --- a/Tests/QtAutogen/UicInterface/CMakeLists.txt +++ b/Tests/QtAutogen/UicInterface/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(UicInterface) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") set(CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE ON) set(CMAKE_AUTOMOC ON) @@ -43,12 +43,12 @@ set(INC_DIR "include" ) endif() add_library(LibWidget libwidget.cpp) -target_link_libraries(LibWidget KI18n ${QT_QTGUI_TARGET}) +target_link_libraries(LibWidget KI18n ${QT_LIBRARIES}) set_property(TARGET LibWidget PROPERTY NO_KUIT_SEMANTIC ON) set_property(TARGET LibWidget PROPERTY TRANSLATION_DOMAIN customdomain) add_library(MyWidget mywidget.cpp) -target_link_libraries(MyWidget KI18n ${QT_QTGUI_TARGET}) +target_link_libraries(MyWidget KI18n ${QT_LIBRARIES}) add_executable(QtAutoUicInterface main.cpp) target_compile_definitions(QtAutoUicInterface diff --git a/Tests/QtAutogen/UicOnly/CMakeLists.txt b/Tests/QtAutogen/UicOnly/CMakeLists.txt index f927f72..b163254 100644 --- a/Tests/QtAutogen/UicOnly/CMakeLists.txt +++ b/Tests/QtAutogen/UicOnly/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(UicOnly) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test AUTOUIC being enabled only add_executable(uicOnly main.cpp UicOnly.cpp) diff --git a/Tests/QtAutogen/UicSkipSource/CMakeLists.txt b/Tests/QtAutogen/UicSkipSource/CMakeLists.txt index e94864d..dc3b7d4e 100644 --- a/Tests/QtAutogen/UicSkipSource/CMakeLists.txt +++ b/Tests/QtAutogen/UicSkipSource/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.10) project(UicSkipSource) -include("../AutogenTest.cmake") +include("../AutogenGuiTest.cmake") # Test for SKIP_AUTOUIC and SKIP_AUTOGEN on an AUTOUIC enabled target set(skipUicSources |