Commit 004ef9bb authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

Cleaning up install rules.

ParaView no longer does third party installs.
Also deprecating ParaViewBrandingCPack. Users should use CPack directly if
needed.

Change-Id: I81c9170ec1f788e026a82bd525b928b76cdc37a4
parent 084fc96b
......@@ -4,7 +4,6 @@ include_directories(${VTK_INCLUDE_DIRS})
link_directories(${VTK_LIBRARY_DIRS})
include(ParaViewBranding)
include(ParaViewBrandingCPack)
if (PARAVIEW_BUILD_QT_GUI)
add_subdirectory(ParaView)
......
This diff is collapsed.
This diff is collapsed.
......@@ -228,12 +228,6 @@ FUNCTION(build_paraview_client BPC_NAME)
CONFIGURE_FILE(${branding_source_dir}/branded_paraview_initializer.h.in
${CMAKE_CURRENT_BINARY_DIR}/pq${BPC_NAME}Initializer.h @ONLY)
IF (NOT Q_WS_MAC)
SET(pv_exe_name ${BPC_NAME}${PV_EXE_SUFFIX})
ELSE (NOT Q_WS_MAC)
SET(pv_exe_name ${BPC_NAME})
ENDIF (NOT Q_WS_MAC)
INCLUDE_DIRECTORIES(
${PARAVIEW_GUI_INCLUDE_DIRS}
)
......@@ -259,14 +253,14 @@ FUNCTION(build_paraview_client BPC_NAME)
IF (PV_INSTALL_LIB_DIR)
INSTALL(TARGETS pq${BPC_NAME}Initializer
DESTINATION ${PV_INSTALL_LIB_DIR}
COMPONENT BrandedRuntime)
COMPONENT Runtime)
ENDIF (PV_INSTALL_LIB_DIR)
ENDIF (BPC_MAKE_INITIALIZER_LIBRARY)
SET (PV_EXE_LIST ${BPC_NAME})
# needed to set up shared forwarding correctly.
add_executable_with_forwarding2(pv_exe_suffix
vtk_add_executable_with_forwarding2(pv_exe_suffix
"${PARAVIEW_LIBRARY_DIRS}"
"../${PARAVIEW_INSTALL_LIB_DIR}"
"${BPC_INSTALL_LIB_DIR}"
......@@ -277,42 +271,35 @@ FUNCTION(build_paraview_client BPC_NAME)
${qt_menu_nib_sources}
${EXE_SRCS}
)
SET (pv_exe_name ${BPC_NAME}${pv_exe_suffix})
TARGET_LINK_LIBRARIES(${pv_exe_name}
TARGET_LINK_LIBRARIES(${BPC_NAME}
pqApplicationComponents
${QT_QTMAIN_LIBRARY}
${BPC_EXTRA_DEPENDENCIES}
)
IF(NOT DEFINED MAKE_BUNDLE)
INSTALL(TARGETS ${BPC_NAME}
DESTINATION ${BPC_INSTALL_BIN_DIR}
COMPONENT BrandedRuntime)
ENDIF(NOT DEFINED MAKE_BUNDLE)
IF (pv_exe_suffix)
# Shared forwarding enabled.
INSTALL(TARGETS ${pv_exe_name}
DESTINATION ${BPC_INSTALL_LIB_DIR}
COMPONENT BrandedRuntime)
ENDIF (pv_exe_suffix)
IF (BPC_MAKE_INITIALIZER_LIBRARY)
TARGET_LINK_LIBRARIES(${pv_exe_name}
TARGET_LINK_LIBRARIES(${BPC_NAME}
pq${BPC_NAME}Initializer)
ENDIF (BPC_MAKE_INITIALIZER_LIBRARY)
IF (NOT DEFINED MAKE_BUNDLE)
if (pv_exe_suffix)
install(TARGETS ${BPC_NAME}
DESTINATION ${BPC_INSTALL_LIB_DIR}
COMPONENT Runtime)
endif()
install(TARGETS ${BPC_NAME}${pv_exe_suffix}
DESTINATION ${BPC_INSTALL_BIN_DIR}
COMPONENT Runtime)
ENDIF(NOT DEFINED MAKE_BUNDLE)
IF (APPLE)
IF (BPC_BUNDLE_ICON)
SET_TARGET_PROPERTIES(${pv_exe_name} PROPERTIES
SET_TARGET_PROPERTIES(${BPC_NAME} PROPERTIES
MACOSX_BUNDLE_ICON_FILE ${bundle_icon_file})
ENDIF (BPC_BUNDLE_ICON)
SET_TARGET_PROPERTIES(${pv_exe_name} PROPERTIES
SET_TARGET_PROPERTIES(${BPC_NAME} PROPERTIES
MACOSX_BUNDLE_BUNDLE_NAME "${BPC_APPLICATION_NAME}")
ENDIF (APPLE)
# HACK. When employing shared forwarding, I need to expose the real target so
# that dependencies can be added correctly. This will go away once we remove
# VTK_USE_RPATH option all together.
set (paraview_client_real_exe_name ${pv_exe_name} PARENT_SCOPE)
ENDFUNCTION(build_paraview_client)
......@@ -20,6 +20,9 @@
#
# build_paraview_client_cpack_config()
#
message(WARNING "ParaViewBrandingCPack.cmake is deprecated. "
"Applications are expected to manage their own cpack rules by "
"including CPack.cmake from CMake directly")
MACRO(build_paraview_client_cpack_config_init)
PV_PARSE_ARGUMENTS("BCC"
......
......@@ -99,104 +99,6 @@ FUNCTION (pv_install_library libpath dest component)
ENDIF (NOT WIN32)
ENDFUNCTION (pv_install_library)
#----------------------------------------------------------------------------
# Function for adding an executable with support for shared forwarding.
# Typically, one just uses ADD_EXECUTABLE to add an executable target. However
# on linuxes when rpath is off, and shared libararies are on, to over come the
# need for setting the LD_LIBRARY_PATH, we use shared-forwarding. This macro
# makes it easier to employ shared forwarding if needed.
# ARGUMENTS:
# out_real_exe_suffix -- (out) suffix to be added to the exe-target to locate the
# real executable target when shared forwarding is employed.
# This is empty when shared forwarding is not needed.
# exe_name -- (in) exe target name i.e. the first argument to
# ADD_EXECUTABLE.
# Any remaining arguments are simply passed on to the ADD_EXECUTABLE call.
# While writing install rules for this executable. One typically does the
# following.
# INSTALL(TARGETS exe_name
# DESTINATION "bin"
# COMPONENT Runtime)
# IF (pv_exe_suffix)
# # Shared forwarding enabled.
# INSTALL(TARGETS exe_name${out_real_exe_suffix}
# DESTINATION "lib"
# COMPONENT Runtime)
# ENDIF (pv_exe_suffix)
#----------------------------------------------------------------------------
FUNCTION (add_executable_with_forwarding
out_real_exe_suffix
exe_name
)
if (NOT DEFINED PV_INSTALL_LIB_DIR)
MESSAGE(FATAL_ERROR
"PV_INSTALL_LIB_DIR variable must be set before calling add_executable_with_forwarding"
)
endif (NOT DEFINED PV_INSTALL_LIB_DIR)
add_executable_with_forwarding2(out_var "" ""
${PV_INSTALL_LIB_DIR}
${exe_name} ${ARGN})
set (${out_real_exe_suffix} "${out_var}" PARENT_SCOPE)
ENDFUNCTION(add_executable_with_forwarding)
#----------------------------------------------------------------------------
FUNCTION (add_executable_with_forwarding2
out_real_exe_suffix
extra_build_dirs
extra_install_dirs
install_lib_dir
exe_name
)
SET(mac_bundle)
IF (APPLE)
set (largs ${ARGN})
LIST (FIND largs "MACOSX_BUNDLE" mac_bundle_index)
IF (mac_bundle_index GREATER -1)
SET (mac_bundle TRUE)
ENDIF (mac_bundle_index GREATER -1)
ENDIF (APPLE)
SET(PV_EXE_SUFFIX)
IF (BUILD_SHARED_LIBS AND NOT mac_bundle)
IF(NOT WIN32)
SET(exe_output_path ${EXECUTABLE_OUTPUT_PATH})
IF (NOT EXECUTABLE_OUTPUT_PATH)
SET (exe_output_path ${CMAKE_BINARY_DIR})
ENDIF (NOT EXECUTABLE_OUTPUT_PATH)
SET(PV_EXE_SUFFIX -real)
SET(PV_FORWARD_DIR_BUILD "${exe_output_path}")
SET(PV_FORWARD_DIR_INSTALL "../${install_lib_dir}")
SET(PV_FORWARD_PATH_BUILD "\"${PV_FORWARD_DIR_BUILD}\"")
SET(PV_FORWARD_PATH_INSTALL "\"${PV_FORWARD_DIR_INSTALL}\"")
FOREACH(dir ${extra_build_dirs})
SET (PV_FORWARD_PATH_BUILD "${PV_FORWARD_PATH_BUILD},\"${dir}\"")
ENDFOREACH(dir)
FOREACH(dir ${extra_install_dirs})
SET (PV_FORWARD_PATH_INSTALL "${PV_FORWARD_PATH_INSTALL},\"${dir}\"")
ENDFOREACH(dir)
SET(PV_FORWARD_EXE ${exe_name})
CONFIGURE_FILE(
${ParaView_CMAKE_DIR}/pv-forward.c.in
${CMAKE_CURRENT_BINARY_DIR}/${exe_name}-forward.c
@ONLY IMMEDIATE)
add_executable(${exe_name}
${CMAKE_CURRENT_BINARY_DIR}/${exe_name}-forward.c)
set_target_properties(${exe_name} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/launcher)
ADD_DEPENDENCIES(${exe_name} ${exe_name}${PV_EXE_SUFFIX})
ENDIF(NOT WIN32)
ENDIF (BUILD_SHARED_LIBS AND NOT mac_bundle)
add_executable(${exe_name}${PV_EXE_SUFFIX} ${ARGN})
set_target_properties(${exe_name}${PV_EXE_SUFFIX} PROPERTIES
OUTPUT_NAME ${exe_name})
set (${out_real_exe_suffix} "${PV_EXE_SUFFIX}" PARENT_SCOPE)
ENDFUNCTION (add_executable_with_forwarding2)
#########################################################################
# Function to compile a proto file to generate a .h and .cc file
# Arguments:
......@@ -491,12 +393,19 @@ endmacro()
# Function used to add install rules for executables.
#------------------------------------------------------------------------------
function (pv_executable_install name exe_suffix)
install(TARGETS ${name}
DESTINATION ${VTK_INSTALL_RUNTIME_DIR}
COMPONENT Runtime)
if (exe_suffix)
install(TARGETS ${name}${exe_suffix}
# we have two executables to install, one in the bin dir and another in the
# lib dir
# install the real-binary in the lib-dir
install(TARGETS ${name}
DESTINATION ${VTK_INSTALL_LIBRARY_DIR}
COMPONENT Runtime)
endif()
# install the launcher binary in the binary dir. When exe_suffix is empty, the
# launcher binary is same as the real binary.
install(TARGETS ${name}${exe_suffix}
DESTINATION ${VTK_INSTALL_RUNTIME_DIR}
COMPONENT Runtime)
endfunction()
......@@ -61,27 +61,3 @@ if (PARAVIEW_ENABLE_PYTHON)
endif()
#FIXME:MODULARIZATION -- link line for plugins when doing static builds.
#------------------------------------------------------------------------
## FIXME:MODULARIZATION -- NEED TO VERIFY THIS
## We setup the CPack scripts for packaging the server.
## This comes in handy when the Qt client is not built, or we want to package
## the server executables alone (pvpython, pvbatch as well, if python was
## enabled).
#include(ParaViewBrandingCPack)
## Install ParaView client
#build_paraview_client_cpack_config_init(
# PACKAGE_NAME "ParaViewServers"
# ORGANIZATION "Kitware Inc."
# VERSION_MAJOR "${PARAVIEW_VERSION_MAJOR}"
# VERSION_MINOR "${PARAVIEW_VERSION_MINOR}"
# VERSION_PATCH "${PARAVIEW_VERSION_PATCH}"
# DESCRIPTION "ParaView is a scientific visualization tool"
# LICENSE_FILE "${ParaView_SOURCE_DIR}/License_v1.2.txt"
# DESCRIPTION_FILE "${ParaView_SOURCE_DIR}/License_v1.2.txt"
#)
#
#SET (CPACK_INSTALL_CMAKE_PROJECTS_DRAGNDROP
# ${CPACK_INSTALL_CMAKE_PROJECTS})
#build_paraview_client_cpack_config()
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