summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAssam Boudjelthia <assam.boudjelthia@qt.io>2022-11-25 16:48:26 +0200
committerAssam Boudjelthia <assam.boudjelthia@qt.io>2022-12-09 15:25:02 +0200
commit633ab16bc8631df84276323ea299d80a8c45d3f9 (patch)
tree0f4c0b8f921ece280b5fdbbb242d641bf2834cca /src
parentfd6b136337ac94d60d0541700b135721e2d46129 (diff)
CMake:Android: copy templates, bindings and gradle files pre_build
At the moment when doing a non-prefix build and changing some of those files, CMake will not update the changes to the build folder unless done manually or a re-configure is done manually. qt_copy_or_install() only does copy those files at configure time once, and using CMAKE_CONFIGURE_DEPENDS would be an overkill here and even a bit of an extra annoyance, so in this case having a custom command seem to be suitable. Done-with: Alexey Edelev <alexey.edelev@qt.io> Change-Id: I55aa9e9d3eea32a4bb54c64abd4cbdcb891c44b6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/gradle/CMakeLists.txt8
-rw-r--r--src/android/java/CMakeLists.txt7
-rw-r--r--src/android/templates/CMakeLists.txt9
3 files changed, 24 insertions, 0 deletions
diff --git a/src/3rdparty/gradle/CMakeLists.txt b/src/3rdparty/gradle/CMakeLists.txt
index e9060a669f..3013eca1f9 100644
--- a/src/3rdparty/gradle/CMakeLists.txt
+++ b/src/3rdparty/gradle/CMakeLists.txt
@@ -42,3 +42,11 @@ qt_copy_or_install(
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()
diff --git a/src/android/java/CMakeLists.txt b/src/android/java/CMakeLists.txt
index 71446e596c..8f0c0da542 100644
--- a/src/android/java/CMakeLists.txt
+++ b/src/android/java/CMakeLists.txt
@@ -53,4 +53,11 @@ qt_path_join(destination ${QT_INSTALL_DIR} "src/android/java")
qt_copy_or_install(DIRECTORY ${resource_directories}
DESTINATION "${destination}"
)
+
+if(NOT QT_WILL_INSTALL)
+ qt_internal_copy_at_build_time(TARGET Qt${QtBase_VERSION_MAJOR}AndroidBindings
+ DIRECTORIES ${resource_directories}
+ DESTINATION ${destination})
+endif()
+
# special case end
diff --git a/src/android/templates/CMakeLists.txt b/src/android/templates/CMakeLists.txt
index 73dac9aa24..3eba4611e8 100644
--- a/src/android/templates/CMakeLists.txt
+++ b/src/android/templates/CMakeLists.txt
@@ -25,4 +25,13 @@ qt_copy_or_install(FILES ${template_files}
qt_copy_or_install(DIRECTORY ${template_directories}
DESTINATION "${destination}")
+
+if(NOT QT_WILL_INSTALL)
+ qt_internal_copy_at_build_time(TARGET Qt${QtBase_VERSION_MAJOR}AndroidTemplates
+ FILES ${template_files}
+ DIRECTORIES ${template_directories}
+ DESTINATION ${destination}
+ )
+endif()
+
# special case end