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"
184184 CACHE STRING "nanobind domain for MLIR python bindings." )
185185set (MLIR_ENABLE_BINDINGS_PYTHON 0 CACHE BOOL
186186 "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" )
187189set (MLIR_DETECT_PYTHON_ENV_PRIME_SEARCH 1 CACHE BOOL
188190 "Prime the python detection by searching for a full 'Development' \
189191 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(
356356 ADD_TO_PARENT MLIRPythonSources.Dialects
357357 ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR} /mlir"
358358 TD_FILE dialects/EmitC.td
359- SOURCES
359+ SOURCES
360360 dialects/emitc.py
361361 DIALECT_NAME emitc)
362362
@@ -790,7 +790,7 @@ endif()
790790
791791add_mlir_python_common_capi_library(MLIRPythonCAPI
792792 INSTALL_COMPONENT MLIRPythonModules
793- INSTALL_DESTINATION python_packages/mlir_core/mlir/ _mlir_libs
793+ INSTALL_DESTINATION " ${MLIR_BINDINGS_PYTHON_INSTALL_PREFIX} / _mlir_libs"
794794 OUTPUT_DIRECTORY "${MLIR_BINARY_DIR} /python_packages/mlir_core/mlir/_mlir_libs"
795795 RELATIVE_INSTALL_ROOT "../../../.."
796796 DECLARED_HEADERS
@@ -821,7 +821,7 @@ endif()
821821
822822add_mlir_python_modules(MLIRPythonModules
823823 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} "
825825 DECLARED_SOURCES
826826 MLIRPythonSources
827827 MLIRPythonExtension.RegisterEverything
You can’t perform that action at this time.
0 commit comments