• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This file allows users to call find_package(MLIR) and pick up our targets.
2
3@MLIR_CONFIG_CODE@
4
5find_package(LLVM REQUIRED CONFIG
6             HINTS "@MLIR_CONFIG_LLVM_CMAKE_DIR@")
7
8set(MLIR_EXPORTED_TARGETS "@MLIR_EXPORTS@")
9set(MLIR_CMAKE_DIR "@MLIR_CONFIG_CMAKE_DIR@")
10set(MLIR_INCLUDE_DIRS "@MLIR_CONFIG_INCLUDE_DIRS@")
11set(MLIR_TABLEGEN_EXE "@MLIR_TABLEGEN_EXE@")
12
13# For mlir_tablegen()
14set(MLIR_INCLUDE_DIR "@MLIR_INCLUDE_DIR@")
15set(MLIR_MAIN_SRC_DIR "@MLIR_MAIN_SRC_DIR@")
16
17set_property(GLOBAL PROPERTY MLIR_ALL_LIBS "@MLIR_ALL_LIBS@")
18set_property(GLOBAL PROPERTY MLIR_DIALECT_LIBS "@MLIR_DIALECT_LIBS@")
19set_property(GLOBAL PROPERTY MLIR_CONVERSION_LIBS "@MLIR_CONVERSION_LIBS@")
20set_property(GLOBAL PROPERTY MLIR_TRANSLATION_LIBS "@MLIR_TRANSLATION_LIBS@")
21
22# Provide all our library targets to users.
23include("@MLIR_CONFIG_EXPORTS_FILE@")
24
25# By creating these targets here, subprojects that depend on MLIR's
26# tablegen-generated headers can always depend on these targets whether building
27# in-tree with MLIR or not.
28if(NOT TARGET mlir-tablegen-targets)
29  add_custom_target(mlir-tablegen-targets)
30endif()
31if(NOT TARGET mlir-headers)
32  add_custom_target(mlir-headers)
33endif()
34if(NOT TARGET mlir-generic-headers)
35  add_custom_target(mlir-generic-headers)
36endif()
37if(NOT TARGET mlir-doc)
38  add_custom_target(mlir-doc)
39endif()
40