blob: 50cd8502720c91acd2793ea9505f25eebf04b0bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
SET(sources
blender_camera.cpp
blender_mesh.cpp
blender_object.cpp
blender_python.cpp
blender_session.cpp
blender_shader.cpp
blender_sync.cpp)
SET(headers
blender_sync.h
blender_session.h
blender_util.h)
SET(addonfiles
addon/__init__.py
addon/engine.py
addon/enums.py
addon/properties.py
addon/ui.py
addon/xml.py)
INCLUDE_DIRECTORIES(
../render
../device
../kernel
../kernel/svm
../util
../subd
${BLENDER_INCLUDE_DIRS}
${PYTHON_INCLUDE_DIRS}
${GLEW_INCLUDE_PATH})
SET(LIBRARIES
cycles_render
cycles_bvh
cycles_device
cycles_kernel
cycles_util
cycles_subd
${Boost_LIBRARIES}
${OPENGL_LIBRARIES}
${OPENIMAGEIO_LIBRARY}
${GLUT_LIBRARIES}
${CYCLES_GLEW_LIBRARY}
${BLENDER_LIBRARIES})
IF(WITH_CYCLES_OSL)
LIST(APPEND LIBRARIES cycles_kernel_osl ${OSL_LIBRARIES})
ENDIF()
IF(WITH_CYCLES_PARTIO)
LIST(APPEND LIBRARIES ${PARTIO_LIBRARIES})
ENDIF()
IF(WITH_CYCLES_OPENCL)
LIST(APPEND LIBRARIES ${OPENCL_LIBRARIES})
ENDIF()
LINK_DIRECTORIES(${PYTHON_LIBPATH})
SET(CMAKE_MODULE_LINKER_FLAGS ${PYTHON_MODULE_FLAGS})
ADD_LIBRARY(cycles_blender MODULE ${sources} ${headers})
ADD_DEPENDENCIES(cycles_blender bf_rna)
IF(WIN32)
TARGET_LINK_LIBRARIES(cycles_blender ${PYTHON_LINKFLAGS})
TARGET_LINK_LIBRARIES(cycles_blender debug ${PYTHON_LIBRARIES}_d)
TARGET_LINK_LIBRARIES(cycles_blender optimized ${PYTHON_LIBRARIES})
SET_TARGET_PROPERTIES(cycles_blender PROPERTIES PREFIX "lib")
SET_TARGET_PROPERTIES(cycles_blender PROPERTIES SUFFIX ".pyd")
ENDIF()
TARGET_LINK_LIBRARIES(cycles_blender ${LIBRARIES})
INSTALL(FILES ${addonfiles} DESTINATION ${CYCLES_INSTALL_PATH}/cycles)
INSTALL(TARGETS cycles_blender LIBRARY DESTINATION ${CYCLES_INSTALL_PATH}/cycles)
# Install Dynamic Libraries
IF(WIN32)
FILE(GLOB OIIO_DLLS "${CYCLES_OIIO}/bin/*.dll")
FILE(GLOB BOOST_DLLS "${CYCLES_BOOST}/lib/*.dll")
INSTALL(FILES ${OIIO_DLLS} ${BOOST_DLLS}
DESTINATION ${CYCLES_INSTALL_PATH}/cycles)
ENDIF()
IF(UNIX AND NOT APPLE)
# copy libraries to cycles lib directory
SET(install_libs
${OPENIMAGEIO_LIBRARY}
${Boost_LIBRARIES}
${OSL_LIBRARIES}
${PARTIO_LIBRARIES})
LIST(REMOVE_ITEM install_libs optimized)
LIST(REMOVE_ITEM install_libs debug)
INSTALL(FILES ${install_libs}
DESTINATION ${CYCLES_INSTALL_PATH}/cycles/lib)
# set path to look for dynamic libs
SET_TARGET_PROPERTIES(cycles_blender PROPERTIES INSTALL_RPATH $ORIGIN/lib)
ENDIF()
|