set_property(TARGET python-bindings
APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
+ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
+ set(pybind_install_dir ${Python3_SITEARCH})
+ else()
+ string(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" pybind_install_dir ${Python3_SITEARCH})
+ endif()
install(TARGETS python-bindings
- LIBRARY DESTINATION "${Python3_SITEARCH}")
+ LIBRARY DESTINATION "${pybind_install_dir}")
else()
message(FATAL_ERROR "Please install pybind11-dev to build the Python bindings (or disable that option).")
endif()
if(pybind11_FOUND)
message(" Compile Python bindings .....: ${enable_python}")
message(" module ....................: ${PYTHON_MODULE_PREFIX}simgrid${PYTHON_MODULE_EXTENSION}")
- message(" install path ..............: ${Python3_SITEARCH}")
+ message(" install path ..............: ${pybind_install_dir}")
else()
message(" Compile Python bindings .....: OFF (disabled, or pybind11 not found)")
endif()