aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: 958155cf7670de9e3728c26ca76f7f94a184f388 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
cmake_minimum_required(VERSION 3.16)

if (NOT IGNORE_TOO_LONG_PATH_CHECK)
    execute_process(
        COMMAND cmd /c "ver"
        RESULT_VARIABLE EXIT_CODE_RETURN
        OUTPUT_VARIABLE OS_VERSION
        ERROR_QUIET
        OUTPUT_STRIP_TRAILING_WHITESPACE
    )

    if(NOT EXIT_CODE_RETURN AND OS_VERSION MATCHES "Microsoft Windows")
            string(LENGTH
                   ${CMAKE_BINARY_DIR}/src/imports/compat/Components/QuickUltraLiteStudioComponentsplugin_autogen/include/QuickUltraLiteStudioComponentsplugin_QtQuickUltralite_Studio_ComponentsPlugin.moc
                   BINARY_DIR_LENGTH)
            if(BINARY_DIR_LENGTH GREATER 250)
                message(FATAL_ERROR "The path to the build directory results in excessively long file"
                                    " paths. This may cause build issues on Windows. Please use a shorter"
                                    " build directory."
                                    " Or you can try to build by adding -DIGNORE_TOO_LONG_PATH_CHECK=ON"
                                    " to your CMAKE command.")
            endif()
    endif()
endif()

project(QtQuickDesignerComponents
    DESCRIPTION "QtQuick Designer Components"
    HOMEPAGE_URL "https://qt.io/"
    LANGUAGES CXX C
    # we do not know the Qt version here, but it is necessary to have one
    # version is set after we know the current Qt version again
    VERSION "6.2.4"
)

set(CMAKE_AUTOMOC ON)

# Enable reconfiguration of already installed version via
# pretend that we do a Qt repository build that depends on qtdeclarative.
# this activates an early bail out (already existing hack)
# This needs to be called before any find(Qt* is called.
set(QT_REPO_DEPENDENCIES "qtdeclarative")

find_package(Qt6
    CONFIG
    REQUIRED
    COMPONENTS
        BuildInternals
        Quick
        Core
        Qml
        ShaderTools
)
set(PROJECT_VERSION ${Qt6_VERSION})

qt_build_repo()