Cleanup for OSL linking in cmake: Move cmake OSL library search and path definition...
[blender.git] / intern / cycles / cmake / external_libs.cmake
1
2 ###########################################################################
3 # GLUT
4
5 if(WITH_CYCLES_TEST)
6         set(GLUT_ROOT_PATH ${CYCLES_GLUT})
7
8         find_package(GLUT)
9         message(STATUS "GLUT_FOUND=${GLUT_FOUND}")
10
11         include_directories(${GLUT_INCLUDE_DIR})
12 endif()
13
14 if(WITH_SYSTEM_GLEW)
15         set(CYCLES_GLEW_LIBRARY ${GLEW_LIBRARY})
16 else()
17         set(CYCLES_GLEW_LIBRARY extern_glew)
18 endif()
19
20 ###########################################################################
21 # Partio
22
23 if(WITH_CYCLES_PARTIO)
24
25         set(CYCLES_PARTIO "" CACHE PATH "Path to Partio installation")
26
27         message(STATUS "CYCLES_PARTIO = ${CYCLES_PARTIO}")
28
29         find_library(PARTIO_LIBRARIES NAMES partio PATHS ${CYCLES_PARTIO}/lib)
30         find_path(PARTIO_INCLUDES Partio.h ${CYCLES_PARTIO}/include)
31
32         find_package(ZLIB)
33
34         if(PARTIO_INCLUDES AND PARTIO_LIBRARIES AND ZLIB_LIBRARIES)
35                 list(APPEND PARTIO_LIBRARIES ${ZLIB_LIBRARIES})
36                 set(PARTIO_FOUND TRUE)
37                 message(STATUS "PARTIO includes = ${PARTIO_INCLUDES}")
38                 message(STATUS "PARTIO library = ${PARTIO_LIBRARIES}")
39         else()
40                 message(STATUS "PARTIO not found")
41         endif()
42
43         include_directories(${PARTIO_INCLUDES})
44
45 endif()
46
47 ###########################################################################
48 # CUDA
49
50 if(WITH_CYCLES_CUDA_BINARIES)
51         find_package(CUDA) # Try to auto locate CUDA toolkit
52         if(CUDA_FOUND)
53                 message(STATUS "CUDA nvcc = ${CUDA_NVCC_EXECUTABLE}")
54         else()
55                 message(STATUS "CUDA compiler not found, disabling WITH_CYCLES_CUDA_BINARIES")
56                 set(WITH_CYCLES_CUDA_BINARIES OFF)
57         endif()
58 endif()
59