The package halide provides CMake targets: find_package(Halide REQUIRED) # JIT mode: target_link_libraries(main PRIVATE Halide::Halide) # AOT mode: target_link_libraries(gen PRIVATE Halide::Generator) add_halide_library(filter FROM gen) target_link_libraries(main PRIVATE filter) For more information see: https://github.com/halide/Halide/blob/v11.0.1/README_cmake.md