Skip to content

Support independent output directory customization for generated headers in CMake tools #9169

Description

@jiasss

Problem statement

Describe the feature request

Currently, Halide's CMake tooling  emits all build artifacts—including the compiled static/shared library objects and the generated C++ header files (.h) into the exact same directory (typically ${CMAKE_CURRENT_BINARY_DIR}).

In large-scale production environments and complex modern CMake project structures, it is a very common requirement to separate binary artifacts from public interface headers (e.g., binaries go to a build/lib directory, while headers need to be redirected into a designated include/ directory for downstream targets to consume).

Proposed solution

It would be a fantastic quality-of-life improvement if Halide's CMake macros could support a dedicated argument or property to specify an independent header output directory. For example, adding something like a HEADER_OUTPUT_DIR parameter to the macro signature:

 add_halide_library(my_pipeline ... HEADER_OUTPUT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" )

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions