@@ -2,8 +2,7 @@ include(AddMLIRPython)
2
2
3
3
# Specifies that all MLIR packages are co-located under the `mlir_standalone`
4
4
# 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} ." )
7
6
8
7
9
8
################################################################################
@@ -49,30 +48,32 @@ declare_mlir_python_extension(StandalonePythonSources.NanobindExtension
49
48
50
49
add_mlir_python_common_capi_library (StandalonePythonCAPI
51
50
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"
54
53
RELATIVE_INSTALL_ROOT "../../../.."
55
54
DECLARED_SOURCES
56
55
StandalonePythonSources
57
56
# TODO: Remove this in favor of showing fine grained registration once
58
57
# available.
59
58
MLIRPythonExtension.RegisterEverything
60
59
MLIRPythonSources.Core
60
+ MLIRPythonSources.Dialects.builtin
61
61
)
62
62
63
63
################################################################################
64
64
# Instantiation of all Python modules
65
65
################################################################################
66
66
67
67
add_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} "
70
70
DECLARED_SOURCES
71
71
StandalonePythonSources
72
72
# TODO: Remove this in favor of showing fine grained registration once
73
73
# available.
74
74
MLIRPythonExtension.RegisterEverything
75
- MLIRPythonSources
75
+ MLIRPythonSources.Core
76
+ MLIRPythonSources.Dialects.builtin
76
77
COMMON_CAPI_LINK_LIBS
77
78
StandalonePythonCAPI
78
79
)
0 commit comments