A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
try to honor CMAKE_INSTALL_PREFIX when installing the python package
[simgrid.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
981691f
..
10ccdbd
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-840,8
+840,13
@@
if(enable_python)
set_property(TARGET python-bindings
APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
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
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()
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}")
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()
else()
message(" Compile Python bindings .....: OFF (disabled, or pybind11 not found)")
endif()