================ @@ -105,18 +78,32 @@ set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "LLDB/Resources add_dependencies(liblldb-resource-headers liblldb-header-staging) add_dependencies(liblldb liblldb-resource-headers) -# Take the headers from the staging directory and fix up their includes for the framework. -# Then write them to the output directory. +# Glob all necessary header files from source and place them into a list. +file(GLOB public_headers ${LLDB_SOURCE_DIR}/include/lldb/API/*.h) +set(generated_public_headers ${LLDB_OBJ_DIR}/include/lldb/API/SBLanguages.h) +file(GLOB root_public_headers ${LLDB_SOURCE_DIR}/include/lldb/lldb-*.h) +file(GLOB root_private_headers ${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h) +list(REMOVE_ITEM root_public_headers ${root_private_headers}) +set(lldb_framework_header_list ${public_headers} ${generated_public_headers} ${root_public_headers}) + +add_custom_target(lldb-framework-fixup-all-headers) +add_dependencies(lldb-framework-fixup-all-headers liblldb-header-staging) +add_dependencies(liblldb lldb-framework-fixup-all-headers) + +# Go through the header basenames from source and fix up their includes for the framework. +# Then write them to the framework itself. # Also, run unifdef to remove any specified guards from the header files. -file(GLOB lldb_framework_header_staging_list ${lldb_framework_header_staging}/*) -foreach(header ${lldb_framework_header_staging_list}) +foreach(header ${lldb_framework_header_list}) - set(input_header ${header}) - get_filename_component(header_basename ${input_header} NAME) + get_filename_component(header_basename ${header} NAME) + set(input_header ${CMAKE_BINARY_DIR}/include/lldb/${header_basename}) ---------------- bulbazord wrote:
Shouldn't `input_header` just be `${header}` here? https://github.com/llvm/llvm-project/pull/148736 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits