fixed: auto_ptr -> unique_ptr
[opensg.git] / Source / Contrib / ComputeBase / OSGContribComputeBase.Prepare.cmake
blob5b9533fe3bf96f67d0746d4e861294e8c5695a27
2 MESSAGE(STATUS "Prepare OSGComputeBase")
3 MESSAGE(STATUS "")
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)
13 IF(CUDA_NVCC_FLAGS)
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)
27 FIND_PACKAGE(OpenMP)
29 IF(OPENMP_FOUND)
30   SET(OPENMP_LIBRARY gomp)
31 ENDIF()
33 INCLUDE(CudaHelper)
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()
44 IF(OSG_SUPPORT_ROOT)
45   OSG_CONFIGURE_CUDAPARTSDK(${OSG_SUPPORT_ROOT})
46 ENDIF()
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}" )
52 MESSAGE("")
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)