Cycles: Make all #include statements relative to cycles source directory
[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_multi.cpp
29         device_opencl.cpp
30         device_split_kernel.cpp
31         device_task.cpp
32 )
33
34 set(SRC_OPENCL
35         opencl/opencl.h
36
37         opencl/opencl_base.cpp
38         opencl/opencl_mega.cpp
39         opencl/opencl_split.cpp
40         opencl/opencl_util.cpp
41 )
42
43 if(WITH_CYCLES_NETWORK)
44         list(APPEND SRC
45                 device_network.cpp
46         )
47 endif()
48
49 set(SRC_HEADERS
50         device.h
51         device_memory.h
52         device_intern.h
53         device_network.h
54         device_split_kernel.h
55         device_task.h
56 )
57
58 add_definitions(${GL_DEFINITIONS})
59 if(WITH_CYCLES_NETWORK)
60         add_definitions(-DWITH_NETWORK)
61 endif()
62 if(WITH_CYCLES_DEVICE_OPENCL)
63         add_definitions(-DWITH_OPENCL)
64 endif()
65 if(WITH_CYCLES_DEVICE_CUDA)
66         add_definitions(-DWITH_CUDA)
67 endif()
68 if(WITH_CYCLES_DEVICE_MULTI)
69         add_definitions(-DWITH_MULTI)
70 endif()
71
72 include_directories(${INC})
73 include_directories(SYSTEM ${INC_SYS})
74
75 add_library(cycles_device ${SRC} ${SRC_OPENCL} ${SRC_HEADERS})