qt5base-lts/tests/auto/cmake/tst_qaddpreroutine/CMakeLists.txt
Alexandru Croitor b2f00dfb46 CMake: Rename qt6_add_plugin TYPE option to PLUGIN_TYPE
The intention is to remove TYPE as a keyword completely before 6.2.0
release, but in case if that's not possible due to the large amount
of repositories and examples, just print a deprecation warning for
now and handle both TYPE and PLUGIN_TYPE.

Task-number: QTBUG-95170
Pick-to: 6.2
Change-Id: If0c18345483b9254b0fc21120229fcc2a2fbfbf5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-08-06 21:08:21 +02:00

49 lines
1.2 KiB
CMake

#####################################################################
## tst_qaddpreroutine Test:
#####################################################################
cmake_minimum_required(VERSION 3.16)
if(DEFINED CMAKE_Core_MODULE_MAJOR_VERSION)
set(project_version "${CMAKE_Core_MODULE_MAJOR_VERSION}.\
${CMAKE_Core_MODULE_MINOR_VERSION}.${CMAKE_Core_MODULE_PATCH_VERSION}"
)
else()
set(project_version "6.0.0")
endif()
project(tst_qaddpreroutine
LANGUAGES CXX
VERSION "${project_version}"
)
find_package(Qt6 COMPONENTS Core BuildInternals CONFIG REQUIRED)
qt_prepare_standalone_project()
find_package(Qt6 COMPONENTS Gui Test CONFIG REQUIRED)
qt_internal_add_plugin(QTBUG_90341ThemePlugin
OUTPUT_NAME QTBUG_90341
OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}"
CLASS_NAME ThemePlugin
PLUGIN_TYPE platformthemes
DEFAULT_IF TRUE
SOURCES
plugin.cpp
SKIP_INSTALL
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
Qt::GuiPrivate
)
qt_internal_add_test(tst_qaddpreroutine
SOURCES
tst_qaddpreroutine.cpp
PUBLIC_LIBRARIES
Qt::Gui
)
target_compile_definitions(tst_qaddpreroutine
PRIVATE QT_QPA_PLATFORM_PLUGIN_PATH=\"${CMAKE_BINARY_DIR}\")