xref: /trunk/ext_libraries/gtest/win/Library_gtest.mk (revision 45c5a00162811bd03b87fcb4fe9996782f2b59ec)
1#/**************************************************************
2# *
3# * Licensed to the Apache Software Foundation (ASF) under one
4# * or more contributor license agreements.  See the NOTICE file
5# * distributed with this work for additional information
6# * regarding copyright ownership.  The ASF licenses this file
7# * to you under the Apache License, Version 2.0 (the
8# * "License"); you may not use this file except in compliance
9# * with the License.  You may obtain a copy of the License at
10# *
11# *   http://www.apache.org/licenses/LICENSE-2.0
12# *
13# * Unless required by applicable law or agreed to in writing,
14# * software distributed under the License is distributed on an
15# * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16# * KIND, either express or implied.  See the License for the
17# * specific language governing permissions and limitations
18# * under the License.
19# *
20# *************************************************************/
21
22gb_Cxx_extension=cc
23
24$(eval $(call gb_Library_Library,gtest))
25
26$(eval $(call gb_Library_add_package_headers,gtest,gtest_inc))
27
28$(eval $(call gb_Library_set_include,gtest,\
29    $$(INCLUDE) \
30    -I. \
31    -I./include \
32))
33
34$(eval $(call gb_Library_add_defs,gtest,\
35    -DGTEST_CREATE_SHARED_LIBRARY=1 \
36))
37
38# Was the literal list "kernel32 msvcrt oldnames", which is exactly
39# gb_STDLIBS without uwinapi -- so say that instead, and the UCRT's extra CRT
40# pieces arrive here the same way they arrive everywhere else.  Without them
41# the link fails on memcpy/memset and on the POSIX names oldnames.lib
42# forwards (dup2, read, write), which moved into ucrt.lib and vcruntime.lib.
43# On VC9 gb_STDLIBS is "uwinapi kernel32 msvcrt oldnames", so this expands to
44# the identical list it had before.
45$(eval $(call gb_Library_add_linked_libs,gtest,\
46    $(filter-out uwinapi,$(gb_STDLIBS)) \
47    $(gb_Library_STLLIBS) \
48))
49
50$(eval $(call gb_Library_add_exception_objects,gtest, \
51    gtest/$(INPATH)/misc/build/gtest-1.7.0/src/gtest-all \
52))
53