adjust generated target folder property
This commit is contained in:
parent
9ba8b8186c
commit
90ef4deeab
|
@ -163,3 +163,23 @@ macro(qsk_finalize_build_flags)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
function(qsk_internal_sync_generated_target_folder directory)
|
||||||
|
# loop through all targets in the directory recursively and
|
||||||
|
# synchronize the generated target's folder property with
|
||||||
|
# the actual target's folder property
|
||||||
|
get_property(TARGETS DIRECTORY "${directory}" PROPERTY BUILDSYSTEM_TARGETS)
|
||||||
|
foreach(target IN LISTS TARGETS)
|
||||||
|
if(TARGET ${target}_qmlimportscan)
|
||||||
|
get_target_property(folder ${target} FOLDER)
|
||||||
|
set_target_properties(${target}_qmlimportscan PROPERTIES FOLDER ${folder})
|
||||||
|
message(DEBUG "Adjusting target '${target}_qmlimportscan' folder property to ${target}'s folder property '${folder}'")
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
# scan directory recursively
|
||||||
|
get_property(SUBDIRS DIRECTORY "${directory}" PROPERTY SUBDIRECTORIES)
|
||||||
|
foreach(SUBDIR IN LISTS SUBDIRS)
|
||||||
|
qsk_internal_sync_generated_target_folder("${SUBDIR}")
|
||||||
|
endforeach()
|
||||||
|
endfunction()
|
|
@ -21,3 +21,5 @@ if( BUILD_QML_EXPORT )
|
||||||
add_subdirectory(glabels)
|
add_subdirectory(glabels)
|
||||||
add_subdirectory(messageboxQml)
|
add_subdirectory(messageboxQml)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
qsk_internal_sync_generated_target_folder(${CMAKE_CURRENT_LIST_DIR})
|
|
@ -29,3 +29,5 @@ endif()
|
||||||
if(TARGET Qt::QuickWidgets)
|
if(TARGET Qt::QuickWidgets)
|
||||||
add_subdirectory(grids)
|
add_subdirectory(grids)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
qsk_internal_sync_generated_target_folder(${CMAKE_CURRENT_LIST_DIR})
|
Loading…
Reference in New Issue