summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/gradle/CMakeLists.txt
blob: 3400c7e9c382b165f22a86f64e28f0eff0d6db08 (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
set(gradle_programs
    "${CMAKE_CURRENT_SOURCE_DIR}/gradlew"
)
set(gradle_files
    "${CMAKE_CURRENT_SOURCE_DIR}/gradlew.bat"
    "${CMAKE_CURRENT_SOURCE_DIR}/gradle.properties"
)
set(gradle_wrapper
    "${CMAKE_CURRENT_SOURCE_DIR}/gradle"
)
set(gradle_wrapper_files
    "${CMAKE_CURRENT_SOURCE_DIR}/gradle/wrapper/gradle-wrapper.properties"
    "${CMAKE_CURRENT_SOURCE_DIR}/gradle/wrapper/gradle-wrapper.jar"
)

add_custom_target(Qt${QtBase_VERSION_MAJOR}GradleScripts
    SOURCES
        ${gradle_programs}
        ${gradle_files}
        ${gradle_wrapper_files}
)

qt_path_join(destination ${QT_INSTALL_DIR} ${INSTALL_DATADIR} "src/3rdparty/gradle")

qt_copy_or_install(
    PROGRAMS
        ${gradle_programs}
    DESTINATION
        "${destination}"
)

qt_copy_or_install(
    FILES
        ${gradle_files}
    DESTINATION
        "${destination}"
)

qt_copy_or_install(
    DIRECTORY
        ${gradle_wrapper}
    DESTINATION
        "${destination}"
)

if(NOT QT_WILL_INSTALL)
    qt_internal_copy_at_build_time(TARGET Qt${QtBase_VERSION_MAJOR}GradleScripts
        FILES ${gradle_programs} ${gradle_files}
        DIRECTORIES ${gradle_wrapper}
        DESTINATION ${destination}
    )
endif()