Commit 7e35b188 authored by ghweber's avatar ghweber

Support system/MacPorts PySide install.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@22408 18c085ea-50e0-402c-830e-de6fd14e8384
parent 7fa86e61
......@@ -41,6 +41,12 @@
# target's output location on windows to the exe dir, explanation for this
# is within the code below. Change gen_pathsep on windows to "\;".
#
# Gunther H. Weber, Thu Nov 21 18:28:56 PST 2013
# Allow user to set Shiboken_FOUND and PySide_FOUND to set up relevant
# CMake variables manually (necessary for MacPorts PySide install).
# Use ${PYSIDE_PYTHONPATH} instead of ${VISIT_PYSIDE_DIR}/lib/site-packages
# to support using system PySide.
#
#****************************************************************************/
INCLUDE(${VISIT_SOURCE_DIR}/CMake/SetUpThirdParty.cmake)
......@@ -51,8 +57,12 @@ IF(VISIT_PYSIDE_DIR)
set(CMAKE_PREFIX_PATH ${VISIT_PYSIDE_DIR}/lib/cmake/ ${CMAKE_PREFIX_PATH})
set(CMAKE_LIBRARY_PATH ${VISIT_PYSIDE_DIR}/lib ${CMAKE_LIBRARY_PATH})
find_package(Shiboken 1.1.1)
find_package(PySide 1.1.1)
if(NOT Shiboken_FOUND)
find_package(Shiboken 1.1.1)
endif(NOT Shiboken_FOUND)
if (NOT PySide_FOUND)
find_package(PySide 1.1.1)
endif(NOT PySide_FOUND)
IF(Shiboken_FOUND)
SET(GENERATORRUNNER_BINARY ${SHIBOKEN_BINARY})
ENDIF(Shiboken_FOUND)
......@@ -68,17 +78,16 @@ ENDIF (NOT PySide_FOUND OR NOT Shiboken_FOUND)
IF(PySide_FOUND)
SET_UP_THIRD_PARTY(PYSIDE lib include
SET_UP_THIRD_PARTY(PYSIDE lib include
pyside-python${PYTHON_VERSION} shiboken-python${PYTHON_VERSION})
# The PySide module is symlinked into the python install VisIt uses for
# dev builds. For 'make install' and 'make package' we need to actually
# install the PySide SOs.
SET(PYSIDE_MODULE_SRC ${PYSIDE_PYTHONPATH}/PySide/)
IF(UNIX)
SET(PYSIDE_MODULE_SRC ${VISIT_PYSIDE_DIR}/lib/python${PYTHON_VERSION}/site-packages/PySide/)
#SET(PYSIDE_MODULE_INSTALLED_DIR ${VISIT_INSTALLED_VERSION_LIB}/python/lib/python${PYTHON_VERSION}/site-packages/PySide/)
SET(PYSIDE_MODULE_INSTALLED_DIR ${VISIT_INSTALLED_VERSION_LIB}/site-packages/PySide/)
ELSE(UNIX)
SET(PYSIDE_MODULE_SRC ${VISIT_PYSIDE_DIR}/lib/site-packages/PySide/)
#SET(PYSIDE_MODULE_INSTALLED_DIR ${VISIT_INSTALLED_VERSION_LIB}/python/Lib/site-packages/PySide/)
SET(PYSIDE_MODULE_INSTALLED_DIR ${VISIT_INSTALLED_VERSION_LIB}/site-packages/PySide/)
ENDIF(UNIX)
......
......@@ -110,3 +110,16 @@ VISIT_OPTION_DEFAULT(VISIT_SILO_LIBDEP HDF5_LIBRARY_DIR hdf5 ${VISIT_HDF5_LIBDEP
## PySide
##
VISIT_OPTION_DEFAULT(VISIT_PYSIDE_DIR /opt/local)
SET(SHIBOKEN_PYTHON_SUFFIX "-python2.7")
SET(SHIBOKEN_INCLUDE_DIR "/opt/local/include/shiboken-2.7")
SET(SHIBOKEN_LIBRARY "/opt/local/lib/libshiboken-python2.7.dylib")
SET(SHIBOKEN_PYTHON_INCLUDE_DIR "/opt/local/include/shiboken-2.7")
SET(SHIBOKEN_PYTHON_INTERPRETER "/opt/local/bin/python2.7")
SET(SHIBOKEN_PYTHON_LIBRARIES "-undefined dynamic_lookup")
SET(SHIBOKEN_BINARY "/opt/local/bin/shiboken-2.7")
SET(Shiboken_FOUND 1)
SET(PYSIDE_INCLUDE_DIR "/opt/local/include/PySide-2.7")
SET(PYSIDE_LIBRARY "/opt/local/lib/libpyside-python2.7.dylib")
SET(PYSIDE_PYTHONPATH "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages")
SET(PYSIDE_TYPESYSTEMS "/opt/local/share/PySide-2.7/typesystems")
SET(PySide_FOUND 1)
......@@ -75,6 +75,10 @@
# Kathleen Biagas, Thu June 14 15:53:12 MST 2012
# Add target for pyside on windows.
#
# Gunther H. Weber, Thu Nov 21 18:26:51 PST 2013
# Use ${PYSIDE_PYTHONPATH} (set by findpackage PySide) instead of
# ${VISIT_PYSIDE_DIR}/lib/site-packages to support system PySide installs
#
#----------------------------------------------------------------------------
IF(MESA_FOUND)
......@@ -221,7 +225,7 @@ ENDIF(VISIT_PYTHON_FILTERS)
IF(VISIT_PYTHON_SCRIPTING AND HAVE_PYSIDE)
MESSAGE(STATUS "Adding PySide to lib/site-packages/")
IF (NOT WIN32)
FILE(GLOB PYSIDE_MODULE_ITEMS "${VISIT_PYSIDE_DIR}/lib/python${PYTHON_VERSION}/site-packages/*")
FILE(GLOB PYSIDE_MODULE_ITEMS "${PYSIDE_PYTHONPATH}/*")
FOREACH(ITM ${PYSIDE_MODULE_ITEMS})
GET_FILENAME_COMPONENT(ITM_ABS ${ITM} ABSOLUTE)
GET_FILENAME_COMPONENT(ITM_BASE ${ITM_ABS} NAME)
......@@ -241,9 +245,9 @@ IF(VISIT_PYTHON_SCRIPTING AND HAVE_PYSIDE)
ADD_CUSTOM_TARGET(pyside_modules ALL)
ADD_CUSTOM_COMMAND(TARGET pyside_modules POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory
${VISIT_PYSIDE_DIR}/lib/site-packages/PySide
${PYSIDE_PYTHONPATH}/PySide
${VISIT_LIBRARY_DIR}/site-packages/PySide
COMMENT "Copying ${VISIT_PYSIDE_DIR}/lib/site-packages/PySide to ${VISIT_LIBRARY_DIR}/site-packages/PySide"
COMMENT "Copying ${PYSIDE_PYTHONPATH}/PySide to ${VISIT_LIBRARY_DIR}/site-packages/PySide"
)
ENDIF (NOT WIN32)
ENDIF(VISIT_PYTHON_SCRIPTING AND HAVE_PYSIDE)
......
......@@ -35,6 +35,9 @@
# DAMAGE.
#
# Modifications:
# Gunther H. Weber, Thu Nov 21 18:24:53 PST 2013
# Use instead PYSIDE_INCLUDE_DIR (set by findpackage PySide) instead of
# VISIT_PYSIDE_DIR to support system PySide installs.
#
#*****************************************************************************
......@@ -47,10 +50,10 @@ set(pyside_gui_include_paths
${QT_QTGUI_INCLUDE_DIR}
${QT_QTOPENGL_INCLUDE_DIR}
${QT_INCLUDE_DIR}
${VISIT_PYSIDE_DIR}/include/PySide
${VISIT_PYSIDE_DIR}/include/PySide/QtCore
${VISIT_PYSIDE_DIR}/include/PySide/QtGui
${VISIT_PYSIDE_DIR}/include/PySide/QtOpenGL
${PYSIDE_INCLUDE_DIR}
${PYSIDE_INCLUDE_DIR}/QtCore
${PYSIDE_INCLUDE_DIR}/QtGui
${PYSIDE_INCLUDE_DIR}/QtOpenGL
${VISIT_SOURCE_DIR}/gui/
${VISIT_SOURCE_DIR}/gui/main
${VISIT_SOURCE_DIR}/viewer/subjectproxy
......
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