CMake: add licenseRule.json to IDE projects

Some repos have licenseRule.json files. Adding them to the IDE projects.

Change-Id: I7fdc054d244d48e3343866775671d8f4f4c9390b
Reviewed-by:  Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
(cherry picked from commit 7a62c962383b6a069c6955f57173a0f1001c4461)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Tim Blechmann 2024-04-24 11:25:34 +08:00 committed by Qt Cherry-pick Bot
parent 3053c9b2a3
commit 5241ebcea6

View File

@ -433,8 +433,11 @@ function(qt_internal_show_extra_ide_sources)
# licenses
set(licenses_target_name ${qt_repo_targets_name}_licenses)
file(GLOB licenses_files LIST_DIRECTORIES false LICENSES/*)
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/licenseRule.json")
list(APPEND licenses_files "${CMAKE_CURRENT_SOURCE_DIR}/licenseRule.json")
endif()
if(licenses_files)
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSES" FILES ${licenses_files})
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${licenses_files})
add_custom_target(${licenses_target_name} SOURCES ${licenses_files})
endif()