Commit 290628b9 authored by Ben Boeckel's avatar Ben Boeckel Committed by Kitware Robot
Browse files

Merge topic 'nvindex-plugin' into release

913f40a1 paraview: package IndeX libraries
57b55d7a paraview: build the IndeX plugin if requested
dd4aa991

 nvidiaindex: add project
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Utkarsh Ayachit's avatarUtkarsh Ayachit <utkarsh.ayachit@kitware.com>
Merge-request: !438
parents 7317b8e4 913f40a1
......@@ -128,6 +128,11 @@ function (superbuild_find_projects var)
pywin32)
endif ()
if (WIN32 OR (UNIX AND NOT APPLE))
list(APPEND projects
nvidiaindex)
endif ()
set("${var}"
${projects}
PARENT_SCOPE)
......
if (APPLE)
message(FATAL_ERROR
"NVIDIA IndeX is not supported on macOS.")
endif ()
if (superbuild_build_phase AND "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "18.0" OR
NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0")
message(FATAL_ERROR
"NVIDIA IndeX only provides libraries for MSVC 2013.")
endif ()
endif ()
superbuild_add_project(nvidiaindex
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
"${CMAKE_COMMAND}"
-Dsource_dir:PATH=<SOURCE_DIR>
-Dinstall_dir:PATH=<INSTALL_DIR>
-P "${CMAKE_CURRENT_LIST_DIR}/scripts/nvidiaindex.install.cmake")
......@@ -174,6 +174,9 @@ superbuild_add_project(paraview
-DPARAVIEW_WITH_SUPERBUILD_MESA:BOOL=${paraview_mesa_sb_available}
-DPARAVIEW_WITH_SUPERBUILD_MESA_SWR:BOOL=${mesa_USE_SWR}
# IndeX
-DPARAVIEW_BUILD_PLUGIN_pvNVIDIAIndeX:BOOL=${nvidiaindex_enabled}
# vrpn
-DPARAVIEW_BUILD_PLUGIN_VRPlugin:BOOL=${vrpn_enabled}
-DPARAVIEW_USE_VRPN:BOOL=${vrpn_enabled}
......
if (WIN32)
set(dir "bin")
else ()
set(dir "lib")
endif ()
file(GLOB files "${source_dir}/lib/*")
file(INSTALL ${files}
DESTINATION "${install_dir}/${dir}")
# Make a fake CUDA library. The installer will skip it, but one needs to be
# found for the fixup_bundle scripts.
if (WIN32)
file(WRITE "${install_dir}/${dir}/nvcuda.dll" "")
else ()
file(WRITE "${install_dir}/${dir}/libcuda.so.1" "")
endif ()
......@@ -69,6 +69,28 @@ if (mesa_libraries)
endforeach ()
endif ()
if (nvidiaindex_enabled)
set(nvidiaindex_libraries
dice
nvindex
nvrtc-builtins)
foreach (nvidiaindex_library IN LISTS nvidiaindex_libraries)
file(GLOB lib_filenames
RELATIVE "${superbuild_install_location}/lib"
"${superbuild_install_location}/lib/lib${nvidiaindex_library}.so*")
foreach (lib_filename IN LISTS lib_filenames)
superbuild_unix_install_plugin("${lib_filename}"
"lib"
"lib"
LOADER_PATHS "${library_paths}"
LOCATION "lib"
EXCLUDE_REGEXES ".*/libcuda.so.*")
endforeach ()
endforeach ()
endif ()
if (python_enabled)
include(python.functions)
superbuild_install_superbuild_python(
......
......@@ -54,6 +54,24 @@ install(
COMPONENT superbuild
RENAME ".plugins")
if (nvidiaindex_enabled)
set(nvidiaindex_libraries
libdice
libnvindex
nvrtc-builtins64_90)
foreach (nvidiaindex_library IN LISTS nvidiaindex_libraries)
superbuild_windows_install_plugin("${nvidiaindex_library}.dll"
"bin" "bin"
SEARCH_DIRECTORIES "${superbuild_install_location}/bin"
# Yes, there are 8 slashes here. It goes through one CMake level here,
# another in the `install(CODE)` during the install, and then a regex
# level inside of Python. Since 2^3 is 8, we need 8 slashes to get one in
# the regex character class.
EXCLUDE_REGEXES ".*[/\\\\\\\\]nvcuda.dll")
endforeach ()
endif ()
if (python_enabled)
include(python.functions)
superbuild_install_superbuild_python()
......
......@@ -126,3 +126,14 @@ superbuild_set_revision(boxlib
superbuild_set_revision(las
URL "https://www.paraview.org/files/dependencies/libLAS-1.8.1.tar.bz2"
URL_MD5 2e6a975dafdf57f59a385ccb87eb5919)
set(nvidiaindex_version "2.1.20180215")
if (WIN32)
superbuild_set_revision(nvidiaindex
URL "http://www.paraview.org/files/dependencies/nvidia-index-libs-${nvidiaindex_version}-vs2013-x64.tar.bz2"
URL_MD5 11bc04708dd97c8a41eb81b92b1b60d8)
elseif (UNIX AND NOT APPLE)
superbuild_set_revision(nvidiaindex
URL "http://www.paraview.org/files/dependencies/nvidia-index-libs-${nvidiaindex_version}-linux.tar.bz2"
URL_MD5 617908b181c27bea59d0817ae29fc8f3)
endif ()
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