The package lld provides CMake targets: find_package(MLIR CONFIG REQUIRED) target_include_directories(main PRIVATE ${MLIR_INCLUDE_DIRS}) target_link_libraries(main PRIVATE MLIRIR MLIRParser MLIRPass MLIRSupport ...)