2 MESSAGE(STATUS "Prepare OSGComputeBase")
5 GET_FILENAME_COMPONENT(_CMAKE_CURRENT_LIST_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
7 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${_CMAKE_CURRENT_LIST_DIR}/CMake")
9 IF(CUDA_TOOLKIT_ROOT_DIR)
10 OSG_ADD_OPT(CUDA_TOOLKIT_ROOT_DIR)
11 ENDIF(CUDA_TOOLKIT_ROOT_DIR)
14 OSG_ADD_OPT(CUDA_NVCC_FLAGS)
15 ENDIF(CUDA_NVCC_FLAGS)
17 IF(CUDA_VERBOSE_BUILD)
18 OSG_ADD_OPT(CUDA_VERBOSE_BUILD)
19 ENDIF(CUDA_VERBOSE_BUILD)
21 IF(OPENCL_INCLUDE_DIR)
22 OSG_ADD_OPT(OPENCL_INCLUDE_DIR)
23 ENDIF(OPENCL_INCLUDE_DIR)
25 FIND_PACKAGE(CUDA QUIET)
26 FIND_PACKAGE(OpenCL QUIET)
30 SET(OPENMP_LIBRARY gomp)
35 OSG_SETUP_CUDA_FLAGS()
37 INCLUDE(ConfigurePackages.OSGContribComputeBase)
39 OSG_CONFIGURE_NVSDKCOMMON()
40 #OSG_CONFIGURE_NVOCLUTILS()
41 OSG_CONFIGURE_CUDACOMMON()
42 #OSG_CONFIGURE_CUDAUTIL()
45 OSG_CONFIGURE_CUDAPARTSDK(${OSG_SUPPORT_ROOT})
48 MESSAGE(" with nvsdkcommon : ${OSG_WITH_NVSDKCOMMON}" )
49 MESSAGE(" with cudacommon : ${OSG_WITH_CUDACOMMON}" )
50 MESSAGE(" with opencl utils : ${OSG_WITH_NVOCLUTILS}" )
51 MESSAGE(" with partsdk : ${OSG_WITH_CUDAPARTSDK}" )
54 LIST(APPEND OSG_ADDITIONAL_CONFIGURE_LINES "#cmakedefine OSG_WITH_NVSDKCOMMON 1")
55 LIST(APPEND OSG_ADDITIONAL_CONFIGURE_LINES "#cmakedefine OSG_WITH_NVOCLUTILS 1")
56 LIST(APPEND OSG_ADDITIONAL_CONFIGURE_LINES "#cmakedefine OSG_WITH_CUDACOMMON 1")
57 LIST(APPEND OSG_ADDITIONAL_CONFIGURE_LINES "#cmakedefine OSG_WITH_CUDAUTIL 1")
58 LIST(APPEND OSG_ADDITIONAL_CONFIGURE_LINES "#cmakedefine OSG_WITH_CUDPP 1")
60 INSTALL(FILES "${_CMAKE_CURRENT_LIST_DIR}/CMake/FindOpenCL.cmake"
61 DESTINATION share/OpenSG/cmake)
62 # COMPONENT development_configuration)
64 INSTALL(FILES "${_CMAKE_CURRENT_LIST_DIR}/CMake/ConfigurePackages.OSGContribComputeBase.cmake"
65 DESTINATION share/OpenSG/cmake)
66 # COMPONENT development_configuration)
68 INSTALL(FILES "${_CMAKE_CURRENT_LIST_DIR}/CMake/OSGContribComputeBase.SetupHelper.cmake"
69 DESTINATION share/OpenSG/cmake)
70 # COMPONENT development_configuration)
72 INSTALL(FILES "${_CMAKE_CURRENT_LIST_DIR}/CMake/CudaHelper.cmake"
73 DESTINATION share/OpenSG/cmake)
74 # COMPONENT development_configuration)