From b2de87a089f2895b1676951168f21d7dc9fa2b2d Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Fri, 4 Oct 2019 14:58:10 +0200 Subject: [PATCH] CMake: Create output directory for qmlcachegen Change-Id: I395de27bfe0eed46c595ac664b2c7218abbdb28b Reviewed-by: Alexandru Croitor --- cmake/QtResource.cmake.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/QtResource.cmake.in b/cmake/QtResource.cmake.in index a62930f5729..c1754fd8831 100644 --- a/cmake/QtResource.cmake.in +++ b/cmake/QtResource.cmake.in @@ -96,6 +96,10 @@ function(__qt_quick_compiler_process_resources target resource_name) string(REGEX REPLACE "\.qml$" "_qml" compiled_file ${compiled_file}) string(REGEX REPLACE "[\$#\?]+" "_" compiled_file ${compiled_file}) set(compiled_file "${CMAKE_CURRENT_BINARY_DIR}/.rcc/qmlcache/${resource_name}/${compiled_file}.cpp") + get_filename_component(out_dir ${compiled_file} DIRECTORY) + if(NOT EXISTS ${out_dir}) + file(MAKE_DIRECTORY ${out_dir}) + endif() add_custom_command( OUTPUT ${compiled_file} DEPENDS ${file_absolute}