File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -211,20 +211,26 @@ if (SP3_LINK_TO_USER_SITE AND SP3_PYTHON_PACKAGES_LINK_DIRECTORY)
211211 # Create the site-package link directory if it doesn't exists yet
212212 install (DIRECTORY DESTINATION ${SP3_PYTHON_PACKAGES_LINK_DIRECTORY} )
213213 foreach (directory ${directories} )
214+ if (SP3_COMPILED_AS_SOFA_SUBPROJECT)
215+ set (LINK_SOURCE_DIRECTORY ${CMAKE_INSTALL_PREFIX} /plugins/SofaPython3/lib/${SP3_PYTHON_PACKAGES_DIRECTORY} /${directory} )
216+ else ()
217+ set (LINK_SOURCE_DIRECTORY ${CMAKE_INSTALL_PREFIX} /lib/${SP3_PYTHON_PACKAGES_DIRECTORY} /${directory} )
218+ endif ()
219+
214220 if (IS_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} /${SP3_PYTHON_PACKAGES_DIRECTORY} /${directory} )
215221 if (WIN32 )
216222 install (CODE "\
217223 execute_process( \
218224 COMMAND ${CMAKE_COMMAND} -E copy_directory \
219- ${CMAKE_INSTALL_PREFIX} /lib/ ${SP3_PYTHON_PACKAGES_DIRECTORY} / ${directory } / \
225+ ${LINK_SOURCE_DIRECTORY } / \
220226 ${SP3_PYTHON_PACKAGES_LINK_DIRECTORY} /${directory} \
221227 )"
222228 )
223229 else ()
224230 install (CODE "\
225231 execute_process( \
226232 COMMAND ${CMAKE_COMMAND} -E create_symlink \
227- ${CMAKE_INSTALL_PREFIX} /lib/ ${SP3_PYTHON_PACKAGES_DIRECTORY} / ${directory } / \
233+ ${LINK_SOURCE_DIRECTORY } / \
228234 ${SP3_PYTHON_PACKAGES_LINK_DIRECTORY} /${directory} \
229235 )"
230236 )
You can’t perform that action at this time.
0 commit comments