xref: /llvm-project/mlir/examples/transform/Ch2/lib/CMakeLists.txt (revision e2b19ef6ac7e5635699730ff561e7f24775704c9)
1# Outside examples, this should be `add_mlir_library`.
2add_mlir_example_library(
3  # Library called MyExtension.
4  MyExtensionCh2
5
6  # Built from the following source files.
7  MyExtension.cpp
8
9  # Make includes visible without top-level path.
10  ADDITIONAL_HEADER_DIRS
11  ${PROJECT_SOURCE_DIR}/examples/transform/Ch2/include
12
13  # Make sure ODS declaration and definitions are generated before compiling this.
14  DEPENDS
15  MyExtensionCh2IncGen
16
17  # Link in the transform dialect, an all generated dialects.
18  LINK_LIBS PRIVATE
19  MLIRTransformDialect
20  MLIRFuncDialect
21  MLIRSCFDialect
22)
23