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})
+ if("${SIMGRID_PYTHON_LIBDIR}" STREQUAL "") # value not manually set
+ if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr")
+ set(SIMGRID_PYTHON_LIBDIR ${Python3_SITEARCH})
+ else()
+ string(REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX}/" SIMGRID_PYTHON_LIBDIR ${Python3_SITEARCH})
+ endif()
endif()
install(TARGETS python-bindings
- LIBRARY DESTINATION "${pybind_install_dir}")
+ LIBRARY DESTINATION "${SIMGRID_PYTHON_LIBDIR}")
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 ..............: ${pybind_install_dir}")
+ message(" install path ..............: ${SIMGRID_PYTHON_LIBDIR} (force another value with -DSIMGRID_PYTHON_LIBDIR)")
else()
message(" Compile Python bindings .....: OFF (disabled, or pybind11 not found)")
endif()
Take as few optional dependencies as possible, to get minimal
library bindings in Java and Python.
+NS3_HINT (empty by default)
+ Alternative path into which ns-3 should be searched for.
+
+SIMGRID_PYTHON_LIBDIR (auto-detected)
+ Where to install the Python module library. By default, it is set to the cmake Python3_SITEARCH variable if installing to /usr,
+ and a modified version of that variable if installing to another path. Just force another value if the auto-detected default
+ does not fit your setup.
+
SMPI_C_FLAGS, SMPI_CXX_FLAGS, SMPI_Fortran_FLAGS (string)
Default compiler options to use in smpicc, smpicxx, or smpiff.
This can be useful to set options like "-m32" or "-m64".