summaryrefslogtreecommitdiffstats
path: root/cmake/QtPluginConfig.cmake.in
blob: 1ec7663ac6f6b1c7619992dc8f0969870be66b3a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Copyright (C) 2024 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

include_guard(DIRECTORY)

if(DEFINED QT_REPO_DEPENDENCIES
    AND NOT QT_INTERNAL_BUILD_STANDALONE_PARTS
    AND NOT QT_BUILD_STANDALONE_TESTS)
    # We're building a Qt repository.
    # Skip this plugin if it has not been provided by one of this repo's dependencies.
    string(TOLOWER "@PROJECT_NAME@" lower_case_project_name)
    if(NOT lower_case_project_name IN_LIST QT_REPO_DEPENDENCIES)
        return()
    endif()
endif()

@skip_internal_test_plugin@

@PACKAGE_INIT@

cmake_minimum_required(VERSION @min_new_policy_version@...@max_new_policy_version@)

include(CMakeFindDependencyMacro)

if (NOT QT_NO_CREATE_TARGETS)
    # Find required dependencies, if any.
    if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
        include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
    else()
        set(@target@_FOUND TRUE)
    endif()

    if(@target@_FOUND)
        include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake")
        include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@AdditionalTargetInfo.cmake")
    endif()
endif()