ClangFormat: apply to source, most of intern
[blender.git] / intern / cycles / blender / CMakeLists.txt
1
2 set(INC
3   ..
4   ../../glew-mx
5   ../../guardedalloc
6   ../../mikktspace
7   ../../../source/blender/makesdna
8   ../../../source/blender/makesrna
9   ../../../source/blender/blenlib
10   ${CMAKE_BINARY_DIR}/source/blender/makesrna/intern
11 )
12
13 set(INC_SYS
14   ${PYTHON_INCLUDE_DIRS}
15   ${GLEW_INCLUDE_DIR}
16 )
17
18 set(SRC
19   blender_camera.cpp
20   blender_device.cpp
21   blender_mesh.cpp
22   blender_object.cpp
23   blender_object_cull.cpp
24   blender_particles.cpp
25   blender_curves.cpp
26   blender_logging.cpp
27   blender_python.cpp
28   blender_session.cpp
29   blender_shader.cpp
30   blender_sync.cpp
31   blender_texture.cpp
32
33   CCL_api.h
34   blender_object_cull.h
35   blender_sync.h
36   blender_session.h
37   blender_texture.h
38   blender_util.h
39 )
40
41 set(LIB
42   cycles_bvh
43   cycles_device
44   cycles_graph
45   cycles_kernel
46   cycles_render
47   cycles_subd
48   cycles_util
49 )
50
51 if(WITH_CYCLES_LOGGING)
52   list(APPEND LIB
53     extern_glog
54   )
55 endif()
56
57 set(ADDON_FILES
58   addon/__init__.py
59   addon/engine.py
60   addon/operators.py
61   addon/osl.py
62   addon/presets.py
63   addon/properties.py
64   addon/ui.py
65   addon/version_update.py
66 )
67
68 add_definitions(${GL_DEFINITIONS})
69
70 if(WITH_CYCLES_DEVICE_OPENCL)
71     add_definitions(-DWITH_OPENCL)
72 endif()
73
74 if(WITH_CYCLES_NETWORK)
75   add_definitions(-DWITH_NETWORK)
76 endif()
77
78 blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
79
80 # avoid link failure with clang 3.4 debug
81 if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
82   set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -gline-tables-only")
83 endif()
84
85 add_dependencies(bf_intern_cycles bf_rna)
86
87 delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${ADDON_FILES}" ${CYCLES_INSTALL_PATH})