ClangFormat: apply to source, most of intern
[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_split.cpp
41   opencl/opencl_util.cpp
42   opencl/memory_manager.cpp
43 )
44
45 if(WITH_CYCLES_NETWORK)
46   list(APPEND SRC
47     device_network.cpp
48   )
49 endif()
50
51 set(SRC_HEADERS
52   device.h
53   device_denoising.h
54   device_memory.h
55   device_intern.h
56   device_network.h
57   device_split_kernel.h
58   device_task.h
59 )
60
61 set(LIB
62
63 )
64
65 if(WITH_CUDA_DYNLOAD)
66   list(APPEND LIB
67     extern_cuew
68   )
69 else()
70   list(APPEND LIB
71     ${CUDA_CUDA_LIBRARY}
72   )
73 endif()
74
75 add_definitions(${GL_DEFINITIONS})
76 if(WITH_CYCLES_NETWORK)
77   add_definitions(-DWITH_NETWORK)
78 endif()
79 if(WITH_CYCLES_DEVICE_OPENCL)
80   add_definitions(-DWITH_OPENCL)
81 endif()
82 if(WITH_CYCLES_DEVICE_CUDA)
83   add_definitions(-DWITH_CUDA)
84 endif()
85 if(WITH_CYCLES_DEVICE_MULTI)
86   add_definitions(-DWITH_MULTI)
87 endif()
88
89 include_directories(${INC})
90 include_directories(SYSTEM ${INC_SYS})
91
92 cycles_add_library(cycles_device "${LIB}" ${SRC} ${SRC_OPENCL} ${SRC_HEADERS})