Commit c4da6e6f authored by Cory Quammen's avatar Cory Quammen
Browse files

executables: Add forwarding executables for non-client exes

Borrow the client forwarding code for now.
parent f5d3f583
...@@ -353,7 +353,6 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n") ...@@ -353,7 +353,6 @@ IDI_ICON1 ICON \"${_paraview_client_APPLICATION_ICON}\"\n")
",\"${_paraview_client_install_path_dir}\"") ",\"${_paraview_client_install_path_dir}\"")
endforeach () endforeach ()
# TODO: Set variables for the file.
configure_file( configure_file(
"${_ParaViewClient_cmake_dir}/paraview_client_launcher.c.in" "${_ParaViewClient_cmake_dir}/paraview_client_launcher.c.in"
"${CMAKE_CURRENT_BINARY_DIR}/${_paraview_client_NAME}_launcher.c" "${CMAKE_CURRENT_BINARY_DIR}/${_paraview_client_NAME}_launcher.c"
......
...@@ -25,9 +25,52 @@ function (paraview_add_executable name) ...@@ -25,9 +25,52 @@ function (paraview_add_executable name)
JOB_POOL_LINK "${paraview_exe_job_link_pool}") JOB_POOL_LINK "${paraview_exe_job_link_pool}")
endif () endif ()
set(_paraview_client_RUNTIME_DESTINATION
"${CMAKE_INSTALL_BINDIR}")
set(_paraview_client_LIBRARY_DESTINATION
"${CMAKE_INSTALL_LIBDIR}")
install( install(
TARGETS "${name}" TARGETS "${name}"
DESTINATION bin DESTINATION bin
COMPONENT runtime COMPONENT runtime
EXPORT ParaView) EXPORT ParaView)
# set up forwarding executables
set(_paraview_client_destination "${_paraview_client_RUNTIME_DESTINATION}")
if (BUILD_SHARED_LIBS AND UNIX AND NOT APPLE)
set(_paraview_client_build_dir "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}")
set(_paraview_client_build_path "\"${_paraview_client_build_dir}\"")
set(_paraview_client_install_dir "../${_paraview_client_LIBRARY_DESTINATION}")
set(_paraview_client_install_path "\"${_paraview_client_install_dir}\"")
set(_paraview_client_NAME ${name})
set(_executable_cmake_dir "${ParaView_SOURCE_DIR}/CMake")
configure_file(
"${_executable_cmake_dir}/paraview_client_launcher.c.in"
"${CMAKE_CURRENT_BINARY_DIR}/${name}_launcher.c"
@ONLY)
add_executable("${name}-launcher"
"${CMAKE_CURRENT_BINARY_DIR}/${name}_launcher.c")
target_include_directories("${name}-launcher"
PRIVATE
"$<TARGET_PROPERTY:VTK::vtksys,INTERFACE_INCLUDE_DIRECTORIES>")
set_target_properties("${name}-launcher"
PROPERTIES
OUTPUT_NAME "${name}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/launcher")
add_dependencies("${name}-launcher"
"${name}")
install(
TARGETS "${name}-launcher"
RUNTIME DESTINATION "${_paraview_client_RUNTIME_DESTINATION}")
set(_paraview_client_destination "${_paraview_client_LIBRARY_DESTINATION}")
endif()
install(
TARGETS "${name}"
# TODO - need export targets?
RUNTIME DESTINATION "${_paraview_client_destination}")
# todo - setup install directory for launcher
endfunction () endfunction ()
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