Fix #34351: Displacement map Bake margin does not work
[blender.git] / extern / libmv / third_party / ssba / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
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.
7 #
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.
12 #
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.
16 #
17 # The Original Code is Copyright (C) 2013, Blender Foundation
18 # All rights reserved.
19 #
20 # Contributor(s): Blender Foundation,
21 #                 Sergey Sharybin
22 #
23 # ***** END GPL LICENSE BLOCK *****
24
25 set(INC
26         .
27         ../ldl/Include
28         ../../../colamd/Include
29 )
30
31 set(INC_SYS
32 )
33
34 set(SRC
35         Geometry/v3d_metricbundle.cpp
36         Math/v3d_optimization.cpp
37
38         Geometry/v3d_cameramatrix.h
39         Geometry/v3d_distortion.h
40         Geometry/v3d_metricbundle.h
41         Math/v3d_linear.h
42         Math/v3d_linear_utils.h
43         Math/v3d_mathutilities.h
44         Math/v3d_optimization.h
45
46         ../ldl/Source/ldl.c
47         ../ldl/Include/ldl.h
48 )
49
50 if(WIN32)
51         if(MSVC)
52                 set(MSVC_OFLAGS O1 O2 Ox)
53                 foreach(FLAG ${MSVC_OFLAGS})
54                         string(REPLACE "${FLAG}" "Od" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
55                         string(REPLACE "${FLAG}" "Od" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO}")
56                 endforeach()
57         endif()
58 endif()
59
60 add_definitions(
61         -DV3DLIB_ENABLE_SUITESPARSE
62 )
63
64 blender_add_lib(extern_ssba "${SRC}" "${INC}" "${INC_SYS}")