File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,8 @@ set(MLIR_BINDINGS_PYTHON_NB_DOMAIN "mlir"
184
184
CACHE STRING "nanobind domain for MLIR python bindings." )
185
185
set (MLIR_ENABLE_BINDINGS_PYTHON 0 CACHE BOOL
186
186
"Enables building of Python bindings." )
187
+ set (MLIR_BINDINGS_PYTHON_INSTALL_PREFIX "python_packages/mlir_core/mlir" CACHE STRING
188
+ "Prefix under install directory to place python bindings" )
187
189
set (MLIR_DETECT_PYTHON_ENV_PRIME_SEARCH 1 CACHE BOOL
188
190
"Prime the python detection by searching for a full 'Development' \
189
191
component first (temporary while diagnosing environment specific Python \
Original file line number Diff line number Diff line change @@ -356,7 +356,7 @@ declare_mlir_dialect_python_bindings(
356
356
ADD_TO_PARENT MLIRPythonSources.Dialects
357
357
ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR} /mlir"
358
358
TD_FILE dialects/EmitC.td
359
- SOURCES
359
+ SOURCES
360
360
dialects/emitc.py
361
361
DIALECT_NAME emitc )
362
362
@@ -790,7 +790,7 @@ endif()
790
790
791
791
add_mlir_python_common_capi_library (MLIRPythonCAPI
792
792
INSTALL_COMPONENT MLIRPythonModules
793
- INSTALL_DESTINATION python_packages/mlir_core/mlir/ _mlir_libs
793
+ INSTALL_DESTINATION " ${MLIR_BINDINGS_PYTHON_INSTALL_PREFIX} / _mlir_libs"
794
794
OUTPUT_DIRECTORY "${MLIR_BINARY_DIR} /python_packages/mlir_core/mlir/_mlir_libs"
795
795
RELATIVE_INSTALL_ROOT "../../../.."
796
796
DECLARED_HEADERS
@@ -821,7 +821,7 @@ endif()
821
821
822
822
add_mlir_python_modules (MLIRPythonModules
823
823
ROOT_PREFIX "${MLIR_BINARY_DIR} /python_packages/mlir_core/mlir"
824
- INSTALL_PREFIX "python_packages/mlir_core/mlir "
824
+ INSTALL_PREFIX "${MLIR_BINDINGS_PYTHON_INSTALL_PREFIX} "
825
825
DECLARED_SOURCES
826
826
MLIRPythonSources
827
827
MLIRPythonExtension.RegisterEverything
You can’t perform that action at this time.
0 commit comments