CMake: fix building without libmv
[blender.git] / extern / glog / 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) 2016, Blender Foundation
18 # All rights reserved.
19 # ***** END GPL LICENSE BLOCK *****
20
21 set(INC
22         src
23         ../gflags/src
24 )
25
26 set(INC_SYS
27 )
28
29 set(SRC
30         src/logging.cc
31         src/raw_logging.cc
32         src/utilities.cc
33         src/vlog_is_on.cc
34
35         src/utilities.h
36
37         src/config.h
38         src/config_freebsd.h
39         src/config_haiku.h
40         src/config_hurd.h
41         src/config_linux.h
42         src/config_mac.h
43
44         src/base/commandlineflags.h
45         src/base/googleinit.h
46         src/base/mutex.h
47
48         src/stacktrace.h
49         src/stacktrace_generic-inl.h
50         src/stacktrace_libunwind-inl.h
51         src/stacktrace_powerpc-inl.h
52         src/stacktrace_x86_64-inl.h
53         src/stacktrace_x86-inl.h
54 )
55
56 set(LIB
57 )
58
59 if(NOT WITH_SYSTEM_GFLAGS)
60         list(APPEND LIB
61                 extern_gflags
62         )
63 endif()
64
65 if(WIN32)
66         list(APPEND SRC
67                 src/windows/port.cc
68
69                 src/windows/glog/raw_logging.h
70                 src/windows/glog/vlog_is_on.h
71                 src/windows/glog/logging.h
72                 src/windows/glog/log_severity.h
73                 src/windows/port.h
74                 src/windows/config.h
75         )
76
77         list(APPEND INC
78                 src/windows
79         )
80 else()
81         list(APPEND INC
82                 include
83         )
84         list(APPEND SRC
85                 src/demangle.cc
86                 src/signalhandler.cc
87                 src/symbolize.cc
88
89                 src/demangle.h
90                 src/symbolize.h
91
92                 include/glog/logging.h
93                 include/glog/log_severity.h
94                 include/glog/raw_logging.h
95                 include/glog/vlog_is_on.h
96         )
97 endif()
98
99 add_definitions(${GFLAGS_DEFINES})
100 add_definitions(${GLOG_DEFINES})
101
102 blender_add_lib(extern_glog "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")