84e2690333e1115b915a78804f23dafd823ab465
[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(ADDON_FILES
42         addon/__init__.py
43         addon/engine.py
44         addon/operators.py
45         addon/osl.py
46         addon/presets.py
47         addon/properties.py
48         addon/ui.py
49         addon/version_update.py
50 )
51
52 add_definitions(${GL_DEFINITIONS})
53
54 if(WITH_CYCLES_NETWORK)
55         add_definitions(-DWITH_NETWORK)
56 endif()
57
58 blender_add_lib(bf_intern_cycles "${SRC}" "${INC}" "${INC_SYS}")
59
60 # avoid link failure with clang 3.4 debug
61 if(CMAKE_C_COMPILER_ID MATCHES "Clang" AND NOT ${CMAKE_C_COMPILER_VERSION} VERSION_LESS '3.4')
62         set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -gline-tables-only")
63 endif()
64
65 add_dependencies(bf_intern_cycles bf_rna)
66
67 delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${ADDON_FILES}" ${CYCLES_INSTALL_PATH})