@@ -2,8 +2,7 @@ include(AddMLIRPython)
22
33# Specifies that all MLIR packages are co-located under the `mlir_standalone`
44# top level package (the API has been embedded in a relocatable way).
5- # TODO: Add an upstream cmake param for this vs having a global here.
6- add_compile_definitions ("MLIR_PYTHON_PACKAGE_PREFIX=mlir_standalone." )
5+ add_compile_definitions ("MLIR_PYTHON_PACKAGE_PREFIX=${MLIR_PYTHON_PACKAGE_PREFIX} ." )
76
87
98################################################################################
@@ -49,30 +48,32 @@ declare_mlir_python_extension(StandalonePythonSources.NanobindExtension
4948
5049add_mlir_python_common_capi_library(StandalonePythonCAPI
5150 INSTALL_COMPONENT StandalonePythonModules
52- INSTALL_DESTINATION python_packages/standalone/mlir_standalone/ _mlir_libs
53- OUTPUT_DIRECTORY "${MLIR_BINARY_DIR} /python_packages/standalone/mlir_standalone /_mlir_libs"
51+ INSTALL_DESTINATION " ${MLIR_BINDINGS_PYTHON_INSTALL_PREFIX} / _mlir_libs"
52+ OUTPUT_DIRECTORY "${MLIR_BINARY_DIR} /${MLIR_BINDINGS_PYTHON_INSTALL_PREFIX} /_mlir_libs"
5453 RELATIVE_INSTALL_ROOT "../../../.."
5554 DECLARED_SOURCES
5655 StandalonePythonSources
5756 # TODO: Remove this in favor of showing fine grained registration once
5857 # available.
5958 MLIRPythonExtension.RegisterEverything
6059 MLIRPythonSources.Core
60+ MLIRPythonSources.Dialects.builtin
6161)
6262
6363################################################################################
6464# Instantiation of all Python modules
6565################################################################################
6666
6767add_mlir_python_modules(StandalonePythonModules
68- ROOT_PREFIX "${MLIR_BINARY_DIR} /python_packages/standalone/mlir_standalone "
69- INSTALL_PREFIX "python_packages/standalone/mlir_standalone "
68+ ROOT_PREFIX "${MLIR_BINARY_DIR} /${MLIR_BINDINGS_PYTHON_INSTALL_PREFIX} "
69+ INSTALL_PREFIX "${MLIR_BINDINGS_PYTHON_INSTALL_PREFIX} "
7070 DECLARED_SOURCES
7171 StandalonePythonSources
7272 # TODO: Remove this in favor of showing fine grained registration once
7373 # available.
7474 MLIRPythonExtension.RegisterEverything
75- MLIRPythonSources
75+ MLIRPythonSources.Core
76+ MLIRPythonSources.Dialects.builtin
7677 COMMON_CAPI_LINK_LIBS
7778 StandalonePythonCAPI
7879 )
0 commit comments