summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorLeander Beernaert <leander.beernaert@qt.io>2019-08-09 15:09:39 +0200
committerLeander Beernaert <leander.beernaert@qt.io>2019-08-09 14:12:37 +0000
commit6ef1b60b08c1e232c84550eba88086d55609478c (patch)
tree077278f896c414115e8aa16ef07b82c95d26212a /cmake
parent1fc117e29de88e5a053eef2a2d11d9fd066ab80c (diff)
Fix QuickCompiler Setup Errors
If the variable resource_files existed in the parent scope, the list would now be duplicate. Fix case where TO_CMAKE_PATH didn't properly convert //Foo into /Foo, so wee need to handle this manually. Change-Id: I73f1b4db82f6a80ba00da928b39091ac6c968a02 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuild.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index e14d7c1391..490df89289 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -2411,6 +2411,7 @@ function(qt_quick_compiler_process_resources target resource_name)
)
set(qml_files)
+ set(resource_files)
# scan for qml files
foreach(file IN LISTS arg_FILES)
# check whether this resource should not be processed by the qt quick
@@ -2444,7 +2445,12 @@ function(qt_quick_compiler_process_resources target resource_name)
get_filename_component(file_absolute ${file} ABSOLUTE)
file(RELATIVE_PATH file_relative ${CMAKE_CURRENT_SOURCE_DIR} ${file_absolute})
qt_get_relative_resource_path_for_file(file_resource_path ${file})
- set(file_resource_path "${arg_PREFIX}/${file_resource_path}")
+ if (arg_PREFIX STREQUAL "/")
+ # TO_CMAKE_PATH does not clean up cases such as //Foo
+ set(file_resource_path "/${file_resource_path}")
+ else()
+ set(file_resource_path "${arg_PREFIX}/${file_resource_path}")
+ endif()
file(TO_CMAKE_PATH ${file_resource_path} file_resource_path)
list(APPEND file_resource_paths ${file_resource_path})
string(REGEX REPLACE "\.js$" "_js" compiled_file ${file_relative})