CMake: prepare for BLENDER_SORTED_LIBS removal
[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(WIN32)
60         list(APPEND SRC
61                 src/windows/port.cc
62
63                 src/windows/glog/raw_logging.h
64                 src/windows/glog/vlog_is_on.h
65                 src/windows/glog/logging.h
66                 src/windows/glog/log_severity.h
67                 src/windows/port.h
68                 src/windows/config.h
69         )
70
71         list(APPEND INC
72                 src/windows
73         )
74 else()
75         list(APPEND INC
76                 include
77         )
78         list(APPEND SRC
79                 src/demangle.cc
80                 src/signalhandler.cc
81                 src/symbolize.cc
82
83                 src/demangle.h
84                 src/symbolize.h
85
86                 include/glog/logging.h
87                 include/glog/log_severity.h
88                 include/glog/raw_logging.h
89                 include/glog/vlog_is_on.h
90         )
91 endif()
92
93 add_definitions(${GFLAGS_DEFINES})
94 add_definitions(${GLOG_DEFINES})
95
96 blender_add_lib(extern_glog "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")