Commit 0125d72f authored by David Partyka's avatar David Partyka
Browse files

Merge branch 'forwarding-executable-macro' into release

parents 225078b8 b14ef262
......@@ -34,11 +34,11 @@ FUNCTION (vtk_add_executable_with_forwarding
)
endif (NOT DEFINED VTK_INSTALL_LIB_DIR_CM24)
add_executable_with_forwarding2(out_var "" ""
vtk_add_executable_with_forwarding2(out_var "" ""
${VTK_INSTALL_LIB_DIR_CM24}
${exe_name} ${ARGN})
set (${out_real_exe_suffix} "${out_var}" PARENT_SCOPE)
ENDFUNCTION(add_executable_with_forwarding)
ENDFUNCTION(vtk_add_executable_with_forwarding)
#----------------------------------------------------------------------------
FUNCTION (vtk_add_executable_with_forwarding2
......@@ -65,7 +65,7 @@ FUNCTION (vtk_add_executable_with_forwarding2
IF (NOT EXECUTABLE_OUTPUT_PATH)
SET (exe_output_path ${CMAKE_BINARY_DIR})
ENDIF (NOT EXECUTABLE_OUTPUT_PATH)
SET(VTK_EXE_SUFFIX -real)
SET(VTK_EXE_SUFFIX -launcher)
SET(VTK_FORWARD_DIR_BUILD "${exe_output_path}")
SET(VTK_FORWARD_DIR_INSTALL "../${install_lib_dir}")
SET(VTK_FORWARD_PATH_BUILD "\"${VTK_FORWARD_DIR_BUILD}\"")
......@@ -79,20 +79,20 @@ FUNCTION (vtk_add_executable_with_forwarding2
SET(VTK_FORWARD_EXE ${exe_name})
CONFIGURE_FILE(
${ParaView_CMAKE_DIR}/vtk-forward.c.in
${VTK_CMAKE_DIR}/vtk-forward.c.in
${CMAKE_CURRENT_BINARY_DIR}/${exe_name}-forward.c
@ONLY IMMEDIATE)
add_executable(${exe_name}
add_executable(${exe_name}${VTK_EXE_SUFFIX}
${CMAKE_CURRENT_BINARY_DIR}/${exe_name}-forward.c)
set_target_properties(${exe_name} PROPERTIES
set_target_properties(${exe_name}${VTK_EXE_SUFFIX} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/launcher)
ADD_DEPENDENCIES(${exe_name} ${exe_name}${VTK_EXE_SUFFIX})
set_target_properties(${exe_name}${VTK_EXE_SUFFIX} PROPERTIES
OUTPUT_NAME ${exe_name})
ADD_DEPENDENCIES(${exe_name}${VTK_EXE_SUFFIX} ${exe_name})
ENDIF(NOT WIN32)
ENDIF (BUILD_SHARED_LIBS AND NOT mac_bundle)
add_executable(${exe_name}${VTK_EXE_SUFFIX} ${ARGN})
set_target_properties(${exe_name}${VTK_EXE_SUFFIX} PROPERTIES
OUTPUT_NAME ${exe_name})
add_executable(${exe_name} ${ARGN})
set (${out_real_exe_suffix} "${VTK_EXE_SUFFIX}" PARENT_SCOPE)
ENDFUNCTION (add_executable_with_forwarding2)
ENDFUNCTION (vtk_add_executable_with_forwarding2)
......@@ -9,7 +9,7 @@ ENDMACRO(VTK_ADD_LIBRARY)
MACRO(VTK_ADD_EXECUTABLE name)
if(UNIX AND VTK_BUILD_FORWARDING_EXECUTABLES)
add_executable_with_forwarding(VTK_EXE_SUFFIX ${name} ${ARGN})
vtk_add_executable_with_forwarding(VTK_EXE_SUFFIX ${name} ${ARGN})
set_property(GLOBAL APPEND PROPERTY VTK_TARGETS ${name})
else()
add_executable(${name} ${ARGN})
......
......@@ -308,6 +308,7 @@ STRING(REGEX REPLACE "^/" "" VTK_INSTALL_JAVA_DIR_CM24 "${VTK_INSTALL_JAVA_DIR}"
# executable under lib.
if(UNIX)
OPTION(VTK_BUILD_FORWARDING_EXECUTABLES "Build forwarding executables for vtk, vtkpython, etc." OFF)
INCLUDE(vtkForwardingExecutable)
MARK_AS_ADVANCED(VTK_BUILD_FORWARDING_EXECUTABLES)
endif()
......
......@@ -20,11 +20,12 @@ if (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
endif(VTK_WRAP_PYTHON)
endif (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
install(FILES ${VTK_SOURCE_DIR}/vtkLogo.ico
DESTINATION ${VTK_INSTALL_BIN_DIR_CM24}
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ
COMPONENT RuntimeExecutables)
if(WIN32)
install(FILES ${VTK_SOURCE_DIR}/vtkLogo.ico
DESTINATION ${VTK_INSTALL_BIN_DIR_CM24}
PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ
COMPONENT RuntimeExecutables)
endif()
if(WIN32)
set(vtk_runtime_dir ${VTK_INSTALL_BIN_DIR_CM24})
......@@ -61,7 +62,8 @@ if(NOT APPLE AND VTK_WRAP_PYTHON)
install(DIRECTORY ${PYTHON_LIBS_DIR}
DESTINATION ${vtk_runtime_dir}
USE_SOURCE_PERMISSIONS
COMPONENT RuntimeLibraries)
COMPONENT RuntimeLibraries
PATTERN "command" EXCLUDE)
endif()
set(_dir "${VTK_INSTALL_LIB_DIR_CM24}")
......@@ -70,7 +72,18 @@ if(WIN32)
endif(WIN32)
list(APPEND lib_search_dir "\${CMAKE_INSTALL_PREFIX}/bin" "\${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_LIB_DIR_CM24}")
list(APPEND lib_search_dir
"\${CMAKE_INSTALL_PREFIX}/bin"
"\${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_LIB_DIR_CM24}")
if(WIN32)
list(APPEND lib_search_dir
"\${CMAKE_INSTALL_PREFIX}/bin" )
else()
list(APPEND lib_search_dir
"\${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_LIB_DIR_CM24}")
endif()
list(APPEND lib_search_dir "${VTK_BINARY_DIR}/bin")
if(WIN32)
......@@ -94,11 +107,15 @@ endif()
set(APPS)
if(VTK_WRAP_PYTHON)
list(APPEND APPS "\${CMAKE_INSTALL_PREFIX}/${_dir}/vtkpython${CMAKE_EXECUTABLE_SUFFIX}") # paths to executables
if(WIN32)
list(APPEND APPS "\${CMAKE_INSTALL_PREFIX}/bin/vtkpython${CMAKE_EXECUTABLE_SUFFIX}") # paths to executables
else()
list(APPEND APPS "\${CMAKE_INSTALL_PREFIX}/${VTK_INSTALL_LIB_DIR_CM24}/vtkpython${CMAKE_EXECUTABLE_SUFFIX}") # paths to executables
endif()
endif()
if(VTK_WRAP_TCL)
#list(APPEND APPS "\${CMAKE_INSTALL_PREFIX}/${_dir}/vtk${CMAKE_EXECUTABLE_SUFFIX}")
#list(APPEND APPS "\${CMAKE_INSTALL_PREFIX}/bin/vtk${CMAKE_EXECUTABLE_SUFFIX}")
endif()
install(CODE "
......
......@@ -306,18 +306,24 @@ IF (VTK_USE_PARALLEL AND VTK_USE_MPI)
ENDIF (VTK_USE_PARALLEL AND VTK_USE_MPI)
IF(NOT VTK_INSTALL_NO_RUNTIME AND NOT VTK_INSTALL_NO_VTKPYTHON)
INSTALL(TARGETS vtkpython ${PVTKPYTHON_EXECUTABLE}
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeExecutables # .exe, .dll
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries # .so, mod.dll
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development # .a, .lib
)
IF(VTK_BUILD_FORWARDING_EXECUTABLES)
INSTALL(TARGETS vtkpython${VTK_EXE_SUFFIX} ${PVTKPYTHON_EXECUTABLE}
INSTALL(TARGETS vtkpython ${PVTKPYTHON_EXECUTABLE}
RUNTIME DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeExecutables # .exe, .dll
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries # .so, mod.dll
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development # .a, .lib
)
INSTALL(TARGETS vtkpython${VTK_EXE_SUFFIX} ${PVTKPYTHON_EXECUTABLE}
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeExecutables # .exe, .dll
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries # .so, mod.dll
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development # .a, .lib
)
ELSE(VTK_BUILD_FORWARDING_EXECUTABLES)
INSTALL(TARGETS vtkpython ${PVTKPYTHON_EXECUTABLE}
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeExecutables # .exe, .dll
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries # .so, mod.dll
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development # .a, .lib
)
ENDIF(VTK_BUILD_FORWARDING_EXECUTABLES)
ENDIF(NOT VTK_INSTALL_NO_RUNTIME AND NOT VTK_INSTALL_NO_VTKPYTHON)
......
......@@ -281,6 +281,7 @@ static void vtkPythonAppInitPrependPath(const char* self_dir)
// packages in sys.path himself/herself.
const char* inst_dirs[] = {
"/lib/python" VTK_PYTHON_VERSION "/site-packages/vtk", // UNIX --prefix
"/python" VTK_PYTHON_VERSION "/site-packages/vtk", // UNIX + Forwarding exe --prefix
"/lib/python/vtk", // UNIX --home
"/Lib/site-packages/vtk", "/Lib/vtk", // Windows
"/site-packages/vtk", "/vtk", // Windows
......
......@@ -109,12 +109,27 @@ SET(VTK_TCL_INSTALL_DIR ${VTK_INSTALL_TCL_DIR}/tcl)
SET(VTK_TCL_INSTALL_DIR_CM24 ${VTK_INSTALL_TCL_DIR_CM24}/tcl)
IF(NOT VTK_INSTALL_NO_RUNTIME)
INSTALL(TARGETS vtk
EXPORT ${VTK_INSTALL_EXPORT_NAME}
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeExecutables # .exe, .dll
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries # .so, mod.dll
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development # .a, .lib
)
IF(VTK_BUILD_FORWARDING_EXECUTABLES)
INSTALL(TARGETS vtk
EXPORT ${VTK_INSTALL_EXPORT_NAME}
RUNTIME DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeExecutables # .exe, .dll
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries # .so, mod.dll
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development # .a, .lib
)
INSTALL(TARGETS vtk${VTK_EXE_SUFFIX}
EXPORT ${VTK_INSTALL_EXPORT_NAME}
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeExecutables # .exe, .dll
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries # .so, mod.dll
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development # .a, .lib
)
ELSE(VTK_BUILD_FORWARDING_EXECUTABLES)
INSTALL(TARGETS vtk
EXPORT ${VTK_INSTALL_EXPORT_NAME}
RUNTIME DESTINATION ${VTK_INSTALL_BIN_DIR_CM24} COMPONENT RuntimeExecutables # .exe, .dll
LIBRARY DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT RuntimeLibraries # .so, mod.dll
ARCHIVE DESTINATION ${VTK_INSTALL_LIB_DIR_CM24} COMPONENT Development # .a, .lib
)
ENDIF(VTK_BUILD_FORWARDING_EXECUTABLES)
ENDIF(NOT VTK_INSTALL_NO_RUNTIME)
# Create the pvtk Tcl wrapper executable with MPI support.
......
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