Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Default Asset File locator for clang docs #97505

Closed
wants to merge 9 commits into from
11 changes: 9 additions & 2 deletions clang-tools-extra/clang-doc/tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ set(assets
)

set(asset_dir "${CMAKE_CURRENT_SOURCE_DIR}/../assets")
set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
set(out_files)

function(copy_files_to_dst src_dir dst_dir file)
Expand All @@ -44,7 +43,15 @@ foreach(f ${assets})
install(FILES ${asset_dir}/${f}
DESTINATION "${CMAKE_INSTALL_DATADIR}/clang-doc"
COMPONENT clang-doc)
copy_files_to_dst(${asset_dir} ${resource_dir} ${f})
if ("${CMAKE_CONFIGURATION_TYPES}" STREQUAL "")
set(resource_dir "${CMAKE_BINARY_DIR}/share/clang-doc")
copy_files_to_dst(${asset_dir} ${resource_dir} ${f})
else()
foreach(config ${CMAKE_CONFIGURATION_TYPES})
set(resource_dir "${CMAKE_BINARY_DIR}/${config}/share/clang-doc")
copy_files_to_dst(${asset_dir} ${resource_dir} ${f})
endforeach(config)
endif()
endforeach(f)

add_custom_target(copy-clang-doc-assets
Expand Down
Loading