ParaViewCommandLineExecutables.cmake
Go to the documentation of this file.
2  # Set up rpaths
3  set(CMAKE_BUILD_RPATH_USE_ORIGIN 1)
4  if (UNIX AND NOT APPLE)
5  file(RELATIVE_PATH _paraview_client_relpath
6  "/prefix/${CMAKE_INSTALL_BINDIR}"
7  "/prefix/${CMAKE_INSTALL_LIBDIR}")
8  set(_paraview_client_origin_rpath
9  "$ORIGIN/${_paraview_client_relpath}")
10 
11  list(APPEND CMAKE_INSTALL_RPATH
12  "${_paraview_client_origin_rpath}")
13  endif()
14 
15  add_executable("${name}" ${ARGN})
16  add_executable("ParaView::${name}" ALIAS "${name}")
17 
18  target_link_libraries("${name}"
19  PRIVATE
20  ParaView::RemotingApplication)
21 
22  target_link_libraries("${name}"
23  PRIVATE
24  ParaView::paraview_plugins)
25 
26  if (PARAVIEW_USE_PYTHON)
27  target_compile_definitions("${name}"
28  PRIVATE
29  PARAVIEW_USE_PYTHON)
30  target_link_libraries("${name}"
31  PRIVATE
32  VTK::PythonInterpreter
33  ParaView::PythonInitializer)
34  endif ()
35 
36  if (paraview_exe_job_link_pool)
37  set_property(TARGET "${name}"
38  PROPERTY
39  JOB_POOL_LINK "${paraview_exe_job_link_pool}")
40  endif ()
41 
42  install(
43  TARGETS "${name}"
44  DESTINATION "${CMAKE_INSTALL_BINDIR}"
45  COMPONENT runtime
46  EXPORT ParaViewTools)
47 endfunction ()
paraview_add_executable
function paraview_add_executable(name)
Definition: ParaViewCommandLineExecutables.cmake:1
name
name