Code refactor: add generic Cycles node infrastructure.
[blender-staging.git] / intern / cycles / device / CMakeLists.txt
1
2 set(INC
3         .
4         ../graph
5         ../kernel
6         ../kernel/svm
7         ../kernel/osl
8         ../util
9         ../render
10         ../../glew-mx
11 )
12
13 set(INC_SYS
14         ${GLEW_INCLUDE_DIR}
15         ../../../extern/clew/include
16 )
17
18 if(WITH_CUDA_DYNLOAD)
19         list(APPEND INC
20                 ../../../extern/cuew/include
21         )
22         add_definitions(-DWITH_CUDA_DYNLOAD)
23 else()
24         list(APPEND INC_SYS
25                 ${CUDA_TOOLKIT_INCLUDE}
26         )
27         add_definitions(-DCYCLES_CUDA_NVCC_EXECUTABLE="${CUDA_NVCC_EXECUTABLE}")
28 endif()
29
30 set(SRC
31         device.cpp
32         device_cpu.cpp
33         device_cuda.cpp
34         device_multi.cpp
35         device_opencl.cpp
36         device_task.cpp
37 )
38
39 if(WITH_CYCLES_NETWORK)
40         list(APPEND SRC
41                 device_network.cpp
42         )
43 endif()
44
45 set(SRC_HEADERS
46         device.h
47         device_memory.h
48         device_intern.h
49         device_network.h
50         device_task.h
51 )
52
53 add_definitions(${GL_DEFINITIONS})
54 if(WITH_CYCLES_NETWORK)
55         add_definitions(-DWITH_NETWORK)
56 endif()
57 if(WITH_CYCLES_DEVICE_OPENCL)
58         add_definitions(-DWITH_OPENCL)
59 endif()
60 if(WITH_CYCLES_DEVICE_CUDA)
61         add_definitions(-DWITH_CUDA)
62 endif()
63 if(WITH_CYCLES_DEVICE_MULTI)
64         add_definitions(-DWITH_MULTI)
65 endif()
66
67 include_directories(${INC})
68 include_directories(SYSTEM ${INC_SYS})
69
70 add_library(cycles_device ${SRC} ${SRC_HEADERS})