Commit 9666138a authored by Jerry Clarke's avatar Jerry Clarke
Browse files

install Xdmf.py and _Xdmf.so in the correct location

parent fbf90325
......@@ -63,6 +63,7 @@ SET( XdmfPythonSource
XdmfPython
)
SET(XDMF_PYTHON_FILE ${Xdmf_SOURCE_DIR}/libsrc/Xdmf.py)
OPTION(XDMF_REGENERATE_WRAPPERS
"Regenerate XdmfPython.cxx" OFF)
MARK_AS_ADVANCED(XDMF_REGENERATE_WRAPPERS)
......@@ -83,7 +84,7 @@ IF(XDMF_REGENERATE_WRAPPERS)
GET_FILENAME_COMPONENT(SWIG_EXE_PATH ${SWIG_EXECUTABLE}
PATH)
SET(SWIG_LIB_PATH "${SWIG_EXE_PATH}/Lib")
MESSAGE("SWIG_LIB_PATH ${SWIG_LIB_PATH}")
# MESSAGE("SWIG_LIB_PATH ${SWIG_LIB_PATH}")
IF(EXISTS "${SWIG_LIB_PATH}")
SET(XDMF_SWIG_INCLUDES
${XDMF_SWIG_INCLUDES}
......@@ -114,10 +115,7 @@ IF(XDMF_REGENERATE_WRAPPERS)
${Xdmf_BINARY_DIR}/libsrc/XdmfPython.cxx
)
ENDIF(SWIG_EXECUTABLE)
INSTALL(FILES ${Xdmf_BINARY_DIR}/libsrc/Xdmf.py
DESTINATION ${XDMF_INSTALL_LIB_DIR_CM24}/python/site-packages/Xdmf
COMPONENT Runtime
)
SET(XDMF_PYTHON_FILE ${Xdmf_BINARY_DIR}/libsrc/Xdmf.py)
ENDIF(XDMF_REGENERATE_WRAPPERS)
......@@ -357,15 +355,17 @@ IF(XDMF_WRAP_PYTHON)
IF(WIN32)
TARGET_LINK_LIBRARIES(_Xdmf ${PYTHON_LIBRARY})
ENDIF(WIN32)
SET(PYTHON_VERSION_NAME "python")
GET_FILENAME_COMPONENT(PYTHON_VERSION_NAME ${PYTHON_INCLUDE_PATH} NAME)
SET_TARGET_PROPERTIES(_Xdmf PROPERTIES PREFIX "")
ADD_DEPENDENCIES(_Xdmf Xdmf)
INSTALL(FILES ${Xdmf_SOURCE_DIR}/libsrc/__init__.py
DESTINATION ${XDMF_INSTALL_LIB_DIR_CM24}/python/site-packages/Xdmf
DESTINATION ${XDMF_INSTALL_LIB_DIR_CM24}/${PYTHON_VERSION_NAME}/site-packages/Xdmf
COMPONENT Runtime
)
IF(NOT XDMF_REGENERATE_WRAPPERS)
INSTALL(FILES ${Xdmf_SOURCE_DIR}/libsrc/Xdmf.py
DESTINATION ${XDMF_INSTALL_LIB_DIR_CM24}/python/site-packages/Xdmf
INSTALL(FILES ${XDMF_PYTHON_FILE}
DESTINATION ${XDMF_INSTALL_LIB_DIR_CM24}/${PYTHON_VERSION_NAME}/site-packages/Xdmf
COMPONENT Runtime
)
ENDIF(NOT XDMF_REGENERATE_WRAPPERS)
......@@ -379,17 +379,18 @@ IF(NOT XDMF_INSTALL_NO_DEVELOPMENT)
FILE(GLOB devFiles RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*.h")
INSTALL(
FILES ${devFiles}
DESTINATION ${XDMF_INSTALL_INCLUDE_DIR})
DESTINATION ${XDMF_INSTALL_INCLUDE_DIR_CM24})
ENDIF(NOT XDMF_INSTALL_NO_DEVELOPMENT)
IF(NOT XDMF_INSTALL_NO_LIBRARIES)
INSTALL(TARGETS Xdmf
RUNTIME DESTINATION ${XDMF_INSTALL_LIB_DIR} COMPONENT Runtime
LIBRARY DESTINATION ${XDMF_INSTALL_LIB_DIR} COMPONENT Runtime
ARCHIVE DESTINATION ${XDMF_INSTALL_LIB_DIR} COMPONENT Development)
RUNTIME DESTINATION ${XDMF_INSTALL_LIB_DIR_CM24} COMPONENT Runtime
LIBRARY DESTINATION ${XDMF_INSTALL_LIB_DIR_CM24} COMPONENT Runtime
ARCHIVE DESTINATION ${XDMF_INSTALL_LIB_DIR_CM24} COMPONENT Development)
IF(XDMF_WRAP_PYTHON)
INSTALL(
TARGETS _Xdmf
${XDMF_INSTALL_LIB_DIR})
DESTINATION
${XDMF_INSTALL_LIB_DIR_CM24}/${PYTHON_VERSION_NAME}/lib-dynload)
ENDIF(XDMF_WRAP_PYTHON)
ENDIF(NOT XDMF_INSTALL_NO_LIBRARIES)
Supports Markdown
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