summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/gradle/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/gradle/CMakeLists.txt')
-rw-r--r--src/3rdparty/gradle/CMakeLists.txt40
1 files changed, 35 insertions, 5 deletions
diff --git a/src/3rdparty/gradle/CMakeLists.txt b/src/3rdparty/gradle/CMakeLists.txt
index f4cf02a90b..3400c7e9c3 100644
--- a/src/3rdparty/gradle/CMakeLists.txt
+++ b/src/3rdparty/gradle/CMakeLists.txt
@@ -1,22 +1,52 @@
-qt_path_join(destination ${QT_INSTALL_DIR} "src/3rdparty/gradle")
+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
- gradlew
+ ${gradle_programs}
DESTINATION
"${destination}"
)
qt_copy_or_install(
FILES
- gradlew.bat
- gradle.properties
+ ${gradle_files}
DESTINATION
"${destination}"
)
qt_copy_or_install(
DIRECTORY
- gradle
+ ${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()