diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-09-04 10:52:18 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-09-04 13:18:08 +0000 |
commit | 18fc9e1bf821130f0cfe45dc7d5c05b70458e7c0 (patch) | |
tree | c9238ca197310c0af8db494b385932d118bbd4f8 /cmake/QtResource.cmake.in | |
parent | 85e3bb7aeaed157526a84f5860260a1dd0df1afb (diff) |
Fix qtdeclarative build on Windows
Our tools are typically installed into the Qt bin directory, after which
they are useable right away on Windows, since the Qt dlls are located
there, too. An exception to the rule are tools that are built within a
module and used right away. At that point they are in the top-level
bin dir of the build directory, along with "local" DLLS they might need,
but with the Qt dlls out of reach. To cover this case, we need to
prepend a PATH adjusting command when using these with
add_custom_command.
Change-Id: I7f58581f5060c8004b5d1fa1f6f17297256783de
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtResource.cmake.in')
-rw-r--r-- | cmake/QtResource.cmake.in | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cmake/QtResource.cmake.in b/cmake/QtResource.cmake.in index 8474183882..3f33ba50e5 100644 --- a/cmake/QtResource.cmake.in +++ b/cmake/QtResource.cmake.in @@ -98,9 +98,10 @@ function(__qt_quick_compiler_process_resources target resource_name) set(compiled_file "${CMAKE_CURRENT_BINARY_DIR}/qmlcache/${resource_name}/${compiled_file}.cpp") add_custom_command( OUTPUT ${compiled_file} - DEPENDS ${file_absolute} + DEPENDS ${file_absolute} @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen COMMAND - @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen + ${QT_TOOL_PATH_SETUP_COMMAND} + $<TARGET_FILE:@QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen> --resource-path ${file_resource_path} -o ${compiled_file} ${file_absolute} @@ -131,9 +132,10 @@ function(__qt_quick_compiler_process_resources target resource_name) add_custom_command( OUTPUT ${qmlcache_loader_file} - DEPENDS ${qmlcache_loader_list} + DEPENDS ${qmlcache_loader_list} @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen COMMAND - @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen + ${QT_TOOL_PATH_SETUP_COMMAND} + $<TARGET_FILE:@QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen> ${retained_args} --resource-name "${resource_name_arg}" -o ${qmlcache_loader_file} |