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