Commit 5cb94d59 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit
Browse files

BUG: Fixing install rules to work on linux.

parent 3d2bce55
......@@ -45,5 +45,6 @@ paraview_build_optional_plugin(StatisticsToolbar "StatisticsToolbar" StatisticsT
paraview_build_optional_plugin(TableToGraphPanel "TableToGraphPanel" TableToGraphPanel OFF)
paraview_build_optional_plugin(TableToSparseArrayPanel "TableToSparseArrayPanel" TableToSparseArrayPanel OFF)
paraview_build_optional_plugin(ThresholdTablePanel "ThresholdTablePanel" ThresholdTablePanel OFF)
paraview_build_optional_plugin(ClientGraphViewFrame "ClientGraphViewFrame" ClientGraphViewFrame OFF)
paraview_build_optional_plugin(ClientGraphViewFrame "ClientGraphViewFrame" ClientGraphViewFrame OFF)
paraview_build_optional_plugin(VisItReaderPlugin "VisItReaderPlugin" VisItDatabaseBridge OFF)
......@@ -4,28 +4,20 @@
# | |
# +---------------------------------------------------------------------------+
#ParaView3
if (UNIX OR CYGWIN)
# +------------------+
# | Unix/Linux/Cygwin|
# +------------------+
set(ParaView_DIR
/home/burlen/ext/kitware_cvs/PV3-VisIt
CACHE FILEPATH
"Path to ParaView build.")
else (UNIX OR CYGWIN)
# +------------------+
# | Windows |
# +------------------+
set(ParaView_DIR
C:/PV3
CACHE FILEPATH
"Path to ParaView build.")
endif (UNIX OR CYGWIN)
set(ParaView_DIR
${ParaView_BINARY_DIR}
CACHE FILEPATH
"Path to ParaView build.")
if (NOT EXISTS ${ParaView_DIR})
MESSAGE( FATAL_ERROR
"Set ParaView_DIR to the path to your local ParaView3 out of source build." )
endif (NOT EXISTS ${ParaView_DIR})
find_package(ParaView REQUIRED)
include(${PARAVIEW_USE_FILE})
INCLUDE(${QT_USE_FILE})
INCLUDE_DIRECTORIES(
${VTK_INCLUDE_DIR}
${PARAVIEW_INCLUDE_DIRS}
${ParaView_SOURCE_DIR}/VTK/GUISupport/Qt
${pqCore_SOURCE_DIR}
${pqCore_BINARY_DIR}
${pqComponents_SOURCE_DIR}
${pqComponents_BINARY_DIR}
${QtWidgets_SOURCE_DIR}
${QtWidgets_BINARY_DIR}
)
......@@ -17,7 +17,11 @@
#
set(_configureVisItDeps)
set(VISIT_LOCAL "${PROJECT_BINARY_DIR}/${PLUGIN_BUILD_TYPE}")
#set(VISIT_LOCAL "${PROJECT_BINARY_DIR}/${PLUGIN_BUILD_TYPE}")
set(VISIT_LOCAL "${ParaView_BINARY_DIR}/bin")
set (_visit_database_files)
set (_visit_avt_files)
if (UNIX OR CYGWIN)
# +------------------+
......@@ -35,6 +39,7 @@ if (UNIX OR CYGWIN)
DEPENDS ${_src}
COMMENT "Copying ${_lib} to local VisIt.")
set(_configureVisItDeps ${_configureVisItDeps} "${VISIT_LOCAL}/${_lib}")
set(_visit_avt_files ${_visit_avt_files} "${VISIT_LOCAL}/${_lib}")
endforeach (_dash_l)
# Gather the database plugins that currently exist.
add_custom_command(
......@@ -55,6 +60,7 @@ if (UNIX OR CYGWIN)
DEPENDS ${_dbPath}
COMMENT "Copying ${_db} to local VisIt databases.")
set(_configureVisItDeps ${_configureVisItDeps} ${VISIT_LOCAL}/databases/${_db})
set(_visit_database_files ${_visit_database_files} ${VISIT_LOCAL}/databases/${_db})
endforeach (_dbPath)
# Gather VisIt's third party deps.
# We don't do this on Linux because it makes more sense for the user to have
......@@ -76,6 +82,7 @@ else (UNIX OR CYGWIN)
DEPENDS ${_dlsrc}
COMMENT "Copying ${_dlib} to local VisIt.")
set(_configureVisItDeps ${_configureVisItDeps} "${VISIT_LOCAL}/${_dlib}")
set(_visit_avt_files ${_visit_avt_files} "${VISIT_LOCAL}/${_dlib}")
# lib's
set(_slib "${_dash_l}.lib")
set(_slsrc "${VISIT_LIB_PATH}/${PLUGIN_BUILD_TYPE}/${_slib}")
......@@ -86,6 +93,7 @@ else (UNIX OR CYGWIN)
DEPENDS ${_slsrc}
COMMENT "Copying ${_slib} to local VisIt.")
set(_configureVisItDeps ${_configureVisItDeps} "${VISIT_LOCAL}/${_slib}")
set(_visit_avt_files ${_visit_avt_files} "${VISIT_LOCAL}/${_slib}")
endforeach (_dash_l)
# Gather the database plugins that currently exist.
add_custom_command(
......@@ -106,6 +114,7 @@ else (UNIX OR CYGWIN)
DEPENDS ${_dbPath}
COMMENT "Copying ${_db} to local VisIt databases.")
set(_configureVisItDeps ${_configureVisItDeps} ${VISIT_LOCAL}/databases/${_db})
set(_visit_database_files ${_visit_database_files} ${VISIT_LOCAL}/databases/${_db})
endforeach (_dbPath)
# Gather VisIt's third party deps, They come pre-built in the Windows project.
# dll's
......@@ -140,3 +149,5 @@ endif (UNIX OR CYGWIN)
#
add_custom_target(configureVisItBin DEPENDS ${_configureVisItDeps})
set (VISIT_FILES_TO_INSTALL_AVT "${_visit_avt_files}" CACHE INTERNAL "Visit AVT Files")
set (VISIT_FILES_TO_INSTALL_DATABASES "${_visit_database_files}" CACHE INTERNAL "Visit Database Files")
......@@ -4,13 +4,20 @@
# | |
# +---------------------------------------------------------------------------+
set(_libExts ".a" ".so" ".lib" ".dll")
foreach(_ext ${_libExts})
file(GLOB _tmpLibs "${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_BUILD_TYPE}/*${_ext}")
file(GLOB _tmpDatabases "${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_BUILD_TYPE}/databases/*${_ext}")
set(_libs ${_libs} ${_tmpLibs})
set(_databases ${_databases} ${_tmpDatabases})
endforeach(_ext)
install(FILES ${VISIT_FILES_TO_INSTALL_AVT}
DESTINATION "${PV_INSTALL_LIB_DIR}"
COMPONENT Runtime)
install(FILES ${VISIT_FILES_TO_INSTALL_DATABASES}
DESTINATION "${PV_INSTALL_BIN_DIR}/plugins/VisItReaderPlugin/databases"
COMPONENT Runtime)
install(FILES ${_libs} DESTINATION ${CMAKE_INSTALL_PREFIX})
install(FILES ${_databases} DESTINATION ${CMAKE_INSTALL_PREFIX}/databases)
#set(_libExts ".a" ".so" ".lib" ".dll")
#foreach(_ext ${_libExts})
# file(GLOB _tmpLibs "${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_BUILD_TYPE}/*${_ext}")
# file(GLOB _tmpDatabases "${CMAKE_CURRENT_BINARY_DIR}/${PLUGIN_BUILD_TYPE}/databases/*${_ext}")
# set(_libs ${_libs} ${_tmpLibs})
# set(_databases ${_databases} ${_tmpDatabases})
#endforeach(_ext)
#
#install(FILES ${_libs} DESTINATION ${CMAKE_INSTALL_PREFIX})
#install(FILES ${_databases} DESTINATION ${CMAKE_INSTALL_PREFIX}/databases)
# +---------------------------------------------------------------------------+
# | |
# | vtk VisIt Database Bridge |
# | |
# +---------------------------------------------------------------------------+
# Pipeline Bridge Target
link_directories(VisItReaderPlugin ${VISIT_LIB_PATH})
include_directories(VisItReaderPlugin ${VISIT_INCLUDE_PATH})
# +---------------------------------------------------------------------------+
# | |
# | VisIt Database Bridge PQ Panel |
......@@ -20,8 +30,31 @@ ADD_PARAVIEW_OBJECT_PANEL(
XML_GROUP sources)
ADD_PARAVIEW_PLUGIN(
vtkVisItDatabaseBridgePanel "1.0"
VisItReaderPlugin "1.0"
GUI_INTERFACES ${IFACES}
SERVER_MANAGER_SOURCES vtkVisItDatabaseBridge.cxx
SERVER_MANAGER_XML vtkVisItDatabaseBridgeServerManager.xml
GUI_RESOURCE_FILES vtkVisItDatabaseBridgeClient.xml
SOURCES pqVisItDatabaseBridgePanel.cxx ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS})
target_link_libraries(VisItReaderPlugin ${VISIT_LIBS} vtkCommon vtkFiltering vtkGraphics vtkParallel vtkVisItDatabase)
# Platform
if (UNIX OR CYGWIN)
message(STATUS "Configuring vtkVisItDatabase for use on Linux.")
set_source_files_properties(VisItReaderPlugin COMPILE_FLAGS ${COMPILE_FLAGS} "-DUNIX")
#set_target_properties(vtkVisItDatabase PROPERTIES LINK_FLAGS -Wl,--rpath,${VISIT_LIB_PATH})
#set_target_properties(vtkVisItDatabase PROPERTIES LINK_FLAGS -Wl,--export-dynamic)
else (UNIX OR CYGWIN)
message(STATUS "Configuring vtkVisItDatabase for use on Windows.")
endif (UNIX OR CYGWIN)
# MPI
if (VISIT_WITH_MPI)
message(STATUS "Configure vtkVisItDatabase for VisIt built with MPI.")
set_source_files_properties(VisItReaderPlugin COMPILE_FLAGS ${COMPILE_FLAGS} "-DMPI")
endif (VISIT_WITH_MPI)
#install(TARGETS VisItReaderPlugin DESTINATION ${CMAKE_INSTALL_PREFIX})
install (TARGETS VisItReaderPlugin
DESTINATION "${PV_INSTALL_BIN_DIR}/plugins/VisItReaderPlugin"
COMPONENT Runtime)
install(TARGETS vtkVisItDatabaseBridgePanel DESTINATION ${CMAKE_INSTALL_PREFIX})
......@@ -24,4 +24,6 @@ if (VISIT_WITH_MPI)
set_source_files_properties(vtkVisItDatabase COMPILE_FLAGS ${COMPILE_FLAGS} "-DMPI")
endif (VISIT_WITH_MPI)
install(TARGETS vtkVisItDatabase DESTINATION ${CMAKE_INSTALL_PREFIX})
install(TARGETS vtkVisItDatabase
DESTINATION "${PV_INSTALL_LIB_DIR}"
COMPONENT Runtime)
# +---------------------------------------------------------------------------+
# | |
# | vtk VisIt Database Bridge |
# | |
# +---------------------------------------------------------------------------+
# Pipeline Bridge Target
link_directories(vtkVisItDatabaseBridge ${VISIT_LIB_PATH})
include_directories(vtkVisItDatabaseBridge ${VISIT_INCLUDE_PATH})
SET(PLUGIN_SRCS vtkVisItDatabaseBridge.cxx)
ADD_PARAVIEW_PLUGIN(
vtkVisItDatabaseBridge "1.0"
SERVER_MANAGER_SOURCES vtkVisItDatabaseBridge.cxx
SERVER_MANAGER_XML vtkVisItDatabaseBridgeServerManager.xml
GUI_RESOURCE_FILES vtkVisItDatabaseBridgeClient.xml)
#add_dependencies(vtkVisItDatabaseBridge xml)
if (UNIX OR CYGWIN)
message(STATUS "Configuring vtkVisItDatabaseBridge for use on Linux.")
#set_target_properties(vtkVisItDatabaseBridge PROPERTIES LINK_FLAGS -Wl,--rpath,${VISIT_LIB_PATH})
#set_target_properties(vtkVisItDatabaseBridge PROPERTIES LINK_FLAGS -Wl,--export-dynamic)
else (UNIX OR CYGWIN)
message(STATUS "Configuring vtkVisItDatabaseBridge for use on Windows.")
endif (UNIX OR CYGWIN)
target_link_libraries(vtkVisItDatabaseBridge vtkVisItDatabase)
target_link_libraries(vtkVisItDatabaseBridge ${VISIT_LIBS})
install(TARGETS vtkVisItDatabaseBridge DESTINATION ${CMAKE_INSTALL_PREFIX})
......@@ -47,6 +47,7 @@ if (BOOTSTRAP)
include("CMake/BootstrapConfig.cmake") # Build configuration tools.
# TODO generate make install for local copy of VisIt.
elseif(NOT BOOTSTRAP)
include_directories(${PARAVIEW_INCLUDE_DIRS};${PARAVIEW_GUI_INCLUDE_DIRS};${PARAVIEW_KWSYS_INCLUDE_DIRS};)
include("CMake/vtkVisItDatabase.cmake") # Build the avt interface.
include("CMake/vtkVisItDatabaseBridge.cmake") # Build the VTK source.
include("CMake/pqVisItDatabaseBridgePanel.cmake") # Build the custom qt panel.
......
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