diff --git a/examples/corelib/time/CMakeLists.txt b/examples/corelib/time/CMakeLists.txt index 32b93e9ecfa..148ae5d0148 100644 --- a/examples/corelib/time/CMakeLists.txt +++ b/examples/corelib/time/CMakeLists.txt @@ -1,4 +1,4 @@ # Copyright (C) 2024 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -add_subdirectory(calendarbackendplugin) +qt_internal_add_example(calendarbackendplugin) diff --git a/examples/corelib/time/calendarbackendplugin/CMakeLists.txt b/examples/corelib/time/calendarbackendplugin/CMakeLists.txt index 7aa4a18a1e5..4f1702c012a 100644 --- a/examples/corelib/time/calendarbackendplugin/CMakeLists.txt +++ b/examples/corelib/time/calendarbackendplugin/CMakeLists.txt @@ -1,10 +1,10 @@ # Copyright (C) 2024 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) project(JulianGregorianCalendar VERSION 0.1 LANGUAGES CXX) -find_package(Qt6 REQUIRED COMPONENTS Core) +find_package(Qt6 REQUIRED COMPONENTS Core Widgets) qt_standard_project_setup() diff --git a/examples/corelib/time/calendarbackendplugin/application/CMakeLists.txt b/examples/corelib/time/calendarbackendplugin/application/CMakeLists.txt index 3cd4ffe430c..da432fe2c75 100644 --- a/examples/corelib/time/calendarbackendplugin/application/CMakeLists.txt +++ b/examples/corelib/time/calendarbackendplugin/application/CMakeLists.txt @@ -1,23 +1,16 @@ # Copyright (C) 2024 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -cmake_minimum_required(VERSION 3.5) -project(JulianGregorianCalendar VERSION 0.1 LANGUAGES CXX) - -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Core) -find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Core) - -qt_standard_project_setup() - -include_directories(../common/) - qt_add_executable(JulianGregorianCalendar ../common/calendarBackendInterface.h main.cpp ) +target_include_directories(JulianGregorianCalendar PRIVATE ../common) + target_link_libraries(JulianGregorianCalendar PRIVATE Qt::Widgets Qt::Core ) + diff --git a/examples/corelib/time/calendarbackendplugin/plugin/CMakeLists.txt b/examples/corelib/time/calendarbackendplugin/plugin/CMakeLists.txt index bac4118b8f5..26a13b29298 100644 --- a/examples/corelib/time/calendarbackendplugin/plugin/CMakeLists.txt +++ b/examples/corelib/time/calendarbackendplugin/plugin/CMakeLists.txt @@ -1,16 +1,6 @@ # Copyright (C) 2024 The Qt Company Ltd. # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause -cmake_minimum_required(VERSION 3.5) -project(calendarPlugin VERSION 0.1 LANGUAGES CXX) - -find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Core) -find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Core) - -qt_standard_project_setup() - -include_directories(../common/) - qt_add_library(calendarPlugin SHARED ../common/calendarBackendInterface.h calendarplugin.h @@ -19,6 +9,8 @@ qt_add_library(calendarPlugin SHARED calendarbackend.h ) +target_include_directories(calendarPlugin PRIVATE ../common) + target_link_libraries(calendarPlugin PRIVATE Qt::Widgets