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