From 72aab1eabea9a846cadf34595c21601a28f653ff Mon Sep 17 00:00:00 2001 From: Avimitin Date: Wed, 6 Dec 2023 20:34:53 +0800 Subject: [PATCH] [frontend]: add install target for frontend headers This can benefit downstream projects by allowing them to easily include headers from a distributed installation. Signed-off-by: Avimitin --- CMakeLists.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4528ce1a9f..4c30e50954 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -208,4 +208,16 @@ add_subdirectory(tests) add_custom_target(check-buddy DEPENDS check-examples check-tests -) \ No newline at end of file +) + +#------------------------------------------------------------------------------- +# Target install +#------------------------------------------------------------------------------- + +# Install frontend interfaces into include directory, so that the downstream project can use them in distribution +install(DIRECTORY buddy/Core buddy/DAP buddy/DIP buddy/LLM + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/buddy-mlir + COMPONENT buddy-mlir-interfaces-headers + FILES_MATCHING + PATTERN "*.h" + )