Merge branch 'master' into blender2.8
[blender.git] / intern / cycles / blender / CMakeLists.txt
1
2 set(INC
3         ../graph
4         ../render
5         ../device
6         ../kernel
7         ../kernel/svm
8         ../util
9         ../subd
10         ../../glew-mx
11         ../../guardedalloc
12         ../../mikktspace
13         ../../../source/blender/makesdna
14         ../../../source/blender/makesrna
15         ../../../source/blender/blenlib
16         ${CMAKE_BINARY_DIR}/source/blender/makesrna/intern
17 )
18
19 set(INC_SYS
20         ${PYTHON_INCLUDE_DIRS}
21         ${GLEW_INCLUDE_DIR}
22 )
23
24 set(SRC
25         blender_camera.cpp
26         blender_mesh.cpp
27         blender_object.cpp
28         blender_curves.cpp
29         blender_logging.cpp
30         blender_python.cpp
31         blender_session.cpp
32         blender_shader.cpp
33         blender_sync.cpp
34         blender_texture.cpp
35
36         CCL_api.h
37         blender_sync.h
38         blender_session.h
39         blender_texture.h
40         blender_util.h
41 )
42
43 set(ADDON_FILES
44         addon/__init__.py
45         addon/engine.py 
46         addon/osl.py
47         addon/presets.py
48         addon/properties.py
49         addon/ui.py
50         addon/version_update.py
51 )
52
53 add_definitions(${GL_DEFINITIONS})
54
55 if(WITH_CYCLES_NETWORK)
56         add_definitions(-DWITH_NETWORK)
57 endif()
58
59 blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}")
60
61 # avoid link failure with clang 3.4 debug
62 if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
63         set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -gline-tables-only")
64 endif()
65
66 add_dependencies(bf_intern_cycles bf_rna)
67
68 delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${ADDON_FILES}" ${CYCLES_INSTALL_PATH})
69