diff options
Diffstat (limited to 'src/3rdparty/gradle/CMakeLists.txt')
-rw-r--r-- | src/3rdparty/gradle/CMakeLists.txt | 59 |
1 files changed, 45 insertions, 14 deletions
diff --git a/src/3rdparty/gradle/CMakeLists.txt b/src/3rdparty/gradle/CMakeLists.txt index d4eaa60838..3400c7e9c3 100644 --- a/src/3rdparty/gradle/CMakeLists.txt +++ b/src/3rdparty/gradle/CMakeLists.txt @@ -1,21 +1,52 @@ -# special case begin -# special case skip regeneration +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" +) -install( +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 - gradlew - gradlew.bat + ${gradle_files} DESTINATION - src/3rdparty/gradle - COMPONENT - Devel) + "${destination}" +) -install( +qt_copy_or_install( DIRECTORY - gradle + ${gradle_wrapper} DESTINATION - src/3rdparty/gradle - COMPONENT - Devel) + "${destination}" +) -# special case end +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() |