2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
set(INC
|
2011-04-28 13:47:27 +00:00
|
|
|
.
|
2016-05-07 17:47:37 +00:00
|
|
|
../graph
|
2011-04-28 13:47:27 +00:00
|
|
|
../kernel
|
2017-02-22 13:10:02 +00:00
|
|
|
../kernel/split
|
2011-04-28 13:47:27 +00:00
|
|
|
../kernel/svm
|
|
|
|
../kernel/osl
|
|
|
|
../util
|
|
|
|
../render
|
2014-10-07 20:46:19 +00:00
|
|
|
../../glew-mx
|
2012-09-20 09:04:43 +00:00
|
|
|
)
|
2012-10-17 04:13:03 +00:00
|
|
|
|
2012-09-20 09:04:43 +00:00
|
|
|
set(INC_SYS
|
2014-12-29 09:48:21 +00:00
|
|
|
${GLEW_INCLUDE_DIR}
|
2014-08-05 07:57:50 +00:00
|
|
|
../../../extern/clew/include
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2016-01-14 07:24:09 +00:00
|
|
|
if(WITH_CUDA_DYNLOAD)
|
2016-01-24 01:13:37 +00:00
|
|
|
list(APPEND INC
|
|
|
|
../../../extern/cuew/include
|
|
|
|
)
|
2016-01-14 07:24:09 +00:00
|
|
|
add_definitions(-DWITH_CUDA_DYNLOAD)
|
|
|
|
else()
|
2016-01-24 01:13:37 +00:00
|
|
|
list(APPEND INC_SYS
|
|
|
|
${CUDA_TOOLKIT_INCLUDE}
|
|
|
|
)
|
2016-01-14 07:24:09 +00:00
|
|
|
add_definitions(-DCYCLES_CUDA_NVCC_EXECUTABLE="${CUDA_NVCC_EXECUTABLE}")
|
|
|
|
endif()
|
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
set(SRC
|
2011-04-27 11:58:34 +00:00
|
|
|
device.cpp
|
|
|
|
device_cpu.cpp
|
|
|
|
device_cuda.cpp
|
|
|
|
device_multi.cpp
|
2011-11-08 20:27:37 +00:00
|
|
|
device_opencl.cpp
|
2017-02-22 13:10:02 +00:00
|
|
|
device_split_kernel.cpp
|
2012-09-04 13:29:07 +00:00
|
|
|
device_task.cpp
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2016-09-14 21:47:54 +00:00
|
|
|
set(SRC_OPENCL
|
|
|
|
opencl/opencl.h
|
|
|
|
|
|
|
|
opencl/opencl_base.cpp
|
|
|
|
opencl/opencl_mega.cpp
|
|
|
|
opencl/opencl_split.cpp
|
|
|
|
opencl/opencl_util.cpp
|
|
|
|
)
|
|
|
|
|
2013-12-07 01:29:53 +00:00
|
|
|
if(WITH_CYCLES_NETWORK)
|
2013-02-06 04:16:28 +00:00
|
|
|
list(APPEND SRC
|
|
|
|
device_network.cpp
|
|
|
|
)
|
2013-01-06 07:10:22 +00:00
|
|
|
endif()
|
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
set(SRC_HEADERS
|
2011-04-27 11:58:34 +00:00
|
|
|
device.h
|
2011-11-10 06:05:22 +00:00
|
|
|
device_memory.h
|
2011-04-27 11:58:34 +00:00
|
|
|
device_intern.h
|
2011-11-08 20:27:37 +00:00
|
|
|
device_network.h
|
2017-02-22 13:10:02 +00:00
|
|
|
device_split_kernel.h
|
2012-09-04 13:29:07 +00:00
|
|
|
device_task.h
|
2011-11-08 20:27:37 +00:00
|
|
|
)
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2014-10-07 20:46:19 +00:00
|
|
|
add_definitions(${GL_DEFINITIONS})
|
2016-01-12 15:50:43 +00:00
|
|
|
if(WITH_CYCLES_NETWORK)
|
|
|
|
add_definitions(-DWITH_NETWORK)
|
|
|
|
endif()
|
|
|
|
if(WITH_CYCLES_DEVICE_OPENCL)
|
|
|
|
add_definitions(-DWITH_OPENCL)
|
|
|
|
endif()
|
|
|
|
if(WITH_CYCLES_DEVICE_CUDA)
|
|
|
|
add_definitions(-DWITH_CUDA)
|
|
|
|
endif()
|
|
|
|
if(WITH_CYCLES_DEVICE_MULTI)
|
|
|
|
add_definitions(-DWITH_MULTI)
|
|
|
|
endif()
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2011-11-08 20:27:37 +00:00
|
|
|
include_directories(${INC})
|
2012-09-20 09:04:43 +00:00
|
|
|
include_directories(SYSTEM ${INC_SYS})
|
2011-11-08 20:27:37 +00:00
|
|
|
|
2016-09-14 21:47:54 +00:00
|
|
|
add_library(cycles_device ${SRC} ${SRC_OPENCL} ${SRC_HEADERS})
|