Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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