I have moved CUDA and NVIDIA SDK into my build tree, which caused FindCuda
to fail. With vtkEdge using (actually including a copy of in
VTKEdge-5-4-0\CMake\FindCuda.cmake) and with this version of FindCuda.cmake
(much the same as the verison in CMake 2.8) having the issue where the
syntax:
FIND_LIBRARY(CUDA_CUTIL_LIBRARY
NAMES cutil64.lib cutil32.lib cutil
PATHS "C:/Program Files (x86)/NVIDIA Corporation/NVIDIA CUDA
SDK/common/lib/"
"C:/Program Files/NVIDIA Corporation/NVIDIA CUDA SDK/common/lib"
DOC "Path to Cuda SDK libraries (cutil)")
Does not allow the user to specify a root path location for the STK such as
something like:
FIND_LIBRARY(CUDA_CUTIL_LIBRARY
NAMES cutil64.lib cutil32.lib cutil
PATHS "C:/Program Files (x86)/NVIDIA Corporation/NVIDIA CUDA
SDK/common/lib/"
"C:/Program Files/NVIDIA Corporation/NVIDIA CUDA SDK/common/lib"
${CUDA_USER_SPECIFIED_NVIDIA_STK_LIB_DIR}
DOC "Path to Cuda SDK libraries (cutil)")
would provide. I have to do something (hack) like the following:
# Where NVIDIA_SDK_DIR is specified by me in my CMake config files
set( CUDA_CUTIL_INCLUDE_DIR ${NVIDIA_SDK_DIR}/common/inc CACHE STRING ""
FORCE )
set( CUDA_CUTIL_LIBRARY ${NVIDIA_SDK_DIR}/common/lib CACHE STRING "" FORCE )
SET( THIRD_PARTY_PACKAGES
vtk-5.4.2
VTKEdge-5-4-0
dcmtk-3.5.4
boost-cmake-1_41_0
)
SET( VTK_DEFINES
-DVTKEdge_USE_CUDA=YES
-DBUILD_SHARED_LIBS=YES
-DVTK_DIR=${INSTALL_PREFIX}
-DBUILD_SHARED_LIBS=YES
-DCUDA_TOOLKIT_ROOT_DIR=${CUDA_TOOLKIT_ROOT_DIR}
-DCUDA_SDK_ROOT_DIR=${CUDA_SDK_ROOT_DIR}
-DCUDA_CUTIL_INCLUDE_DIR=${CUDA_CUTIL_INCLUDE_DIR}
-DCUDA_CUTIL_LIBRARY=${CUDA_CUTIL_LIBRARY}
)
foreach( PACKAGE ${THIRD_PARTY_PACKAGES} )
ExternalProject_Add(
${PACKAGE}
DOWNLOAD_COMMAND ""
SOURCE_DIR ${TOP}/source/cpp/lib/3rdParty/Win/${PACKAGE}
BINARY_DIR ${BUILD_DIR}/ouput/bin/${PACKAGE}
INSTALL_DIR ${INSTALL_PREFIX}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX}
-DINSTALL_PREFIX=${INSTALL_PREFIX}
${VTK_DEFINES}
)
endforeach( PACKAGE )
as to avoid the error on build in VS Studio:
3>CMake Error: The following variables are used in this project, but they
are set to NOTFOUND.
3>Please set them or make sure they are set and tested correctly in the
CMake files: 3>CUDA_CUTIL_LIBRARY (ADVANCED)
--
Brian J. Davis
_______________________________________________
VtkEdge mailing list
[email protected]
http://public.kitware.com/cgi-bin/mailman/listinfo/vtkedge