Commit 74b018cd authored by partyd's avatar partyd
Browse files

ENH: Fix install rules for python so it can install python built from a superbuild tree.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@14910 3bd1e089-480b-0410-8dfb-8563597acbee
parent e5f8fd77
......@@ -115,10 +115,19 @@ endif(CMAKE_SYSTEM MATCHES "SunOS.*")
# Find and install python
if(Slicer3_USE_PYTHON OR Slicer3_USE_PYTHONQT)
set(PYTHON_DIR "${Slicer3_BINARY_DIR}/../Slicer3-lib/python-build")
#assum get build test build tree
get_filename_component(PARENT_BUILD_DIR "${Slicer3_BINARY_DIR}" PATH)
set(PYTHON_DIR "${PARENT_BUILD_DIR}/Slicer3-lib/python-build")
#try superbuild tree
if(NOT EXISTS ${PYTHON_DIR})
get_filename_component(SUPER_BUILD_DIR "${Slicer3_BINARY_DIR}" PATH)
set(PYTHON_DIR "${SUPER_BUILD_DIR}/python-build")
endif()
if(WIN32 AND NOT EXISTS "${PYTHON_DIR}" AND EXISTS "${PYTHON_INCLUDE_PATH}")
get_filename_component(PYTHON_DIR "${PYTHON_INCLUDE_PATH}" PATH)
endif(WIN32 AND NOT EXISTS "${PYTHON_DIR}" AND EXISTS "${PYTHON_INCLUDE_PATH}")
if(EXISTS "${PYTHON_DIR}")
install(DIRECTORY
"${PYTHON_DIR}/"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment