1 # ***** BEGIN GPL LICENSE BLOCK *****
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 # The Original Code is Copyright (C) 2013, Blender Foundation
18 # All rights reserved.
19 # ***** END GPL LICENSE BLOCK *****
31 opensubdiv_capi_type.h
32 opensubdiv_converter_capi.h
33 opensubdiv_evaluator_capi.h
34 opensubdiv_gl_mesh_capi.h
35 opensubdiv_topology_refiner_capi.h
39 macro(OPENSUBDIV_DEFINE_COMPONENT component)
41 add_definitions(-D${component})
46 ${OPENSUBDIV_INCLUDE_DIR}
51 internal/opensubdiv.cc
52 internal/opensubdiv_converter_factory.cc
53 internal/opensubdiv_converter_internal.cc
54 internal/opensubdiv_converter_orient.cc
55 internal/opensubdiv_device_context_cuda.cc
56 internal/opensubdiv_device_context_opencl.cc
57 internal/opensubdiv_evaluator.cc
58 internal/opensubdiv_evaluator_internal.cc
59 internal/opensubdiv_gl_mesh.cc
60 internal/opensubdiv_gl_mesh_draw.cc
61 internal/opensubdiv_gl_mesh_fvar.cc
62 internal/opensubdiv_gl_mesh_internal.cc
63 internal/opensubdiv_topology_refiner.cc
64 internal/opensubdiv_topology_refiner_internal.cc
65 internal/opensubdiv_util.cc
67 internal/opensubdiv_converter_factory.h
68 internal/opensubdiv_converter_internal.h
69 internal/opensubdiv_converter_orient.h
70 internal/opensubdiv_converter_orient_impl.h
71 internal/opensubdiv_device_context_cuda.h
72 internal/opensubdiv_device_context_opencl.h
73 internal/opensubdiv_edge_map.h
74 internal/opensubdiv_evaluator_internal.h
75 internal/opensubdiv_gl_mesh_draw.h
76 internal/opensubdiv_gl_mesh_fvar.h
77 internal/opensubdiv_gl_mesh_internal.h
78 internal/opensubdiv_internal.h
79 internal/opensubdiv_topology_refiner_internal.h
80 internal/opensubdiv_util.h
83 OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_OPENMP)
84 # TODO(sergey): OpenCL is not tested and totally unstable atm.
85 # OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_OPENCL)
86 # TODO(sergey): CUDA stays disabled for util it's ported to drievr API.
87 # OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_CUDA)
88 OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK)
89 OPENSUBDIV_DEFINE_COMPONENT(OPENSUBDIV_HAS_GLSL_COMPUTE)
91 data_to_c_simple(shader/gpu_shader_opensubdiv_vertex.glsl SRC)
92 data_to_c_simple(shader/gpu_shader_opensubdiv_geometry.glsl SRC)
93 data_to_c_simple(shader/gpu_shader_opensubdiv_fragment.glsl SRC)
95 add_definitions(-DGLEW_STATIC)
98 add_definitions(-DNOMINMAX)
99 add_definitions(-D_USE_MATH_DEFINES)
102 # TODO(sergey): Put CUEW back when CUDA is officially supported by OSD.
103 #if(OPENSUBDIV_HAS_CUDA)
105 # ../../extern/cuew/include
107 # add_definitions(-DOPENSUBDIV_HAS_CUEW)
110 if(OPENSUBDIV_HAS_OPENCL)
112 ../../extern/clew/include
114 add_definitions(-DOPENSUBDIV_HAS_CLEW)
118 stub/opensubdiv_stub.cc
119 stub/opensubdiv_evaluator_stub.cc
120 stub/opensubdiv_gl_mesh_stub.cc
121 stub/opensubdiv_topology_refiner_stub.cc
125 blender_add_lib(bf_intern_opensubdiv "${SRC}" "${INC}" "${INC_SYS}")