X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b762622999ae19217b5c7df1a83eea1c2ae2160e..44a269f32d4498977ee78ba7693bbf9979244cff:/CMakeLists.txt?ds=sidebyside diff --git a/CMakeLists.txt b/CMakeLists.txt index 981691faed..10ccdbdfc2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -840,8 +840,13 @@ if(enable_python) 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() @@ -946,7 +951,7 @@ 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()