blob: 78ca06ab01e11157b63d2a5a57abcaf886ae4d52 [file] [log] [blame]
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
config("google_toolbox_for_mac_public_config") {
include_dirs = [
".",
"src",
"src/AppKit",
"src/DebugUtils",
"src/Foundation",
]
}
component("google_toolbox_for_mac") {
sources = [
"src/GTMDefines.h",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
public_configs = [ ":google_toolbox_for_mac_public_config" ]
if (!is_ios) {
sources += [
"src/AppKit/GTMCarbonEvent.h",
"src/AppKit/GTMCarbonEvent.m",
"src/AppKit/GTMUILocalizer.h",
"src/AppKit/GTMUILocalizer.m",
"src/AppKit/GTMUILocalizerAndLayoutTweaker.h",
"src/AppKit/GTMUILocalizerAndLayoutTweaker.m",
"src/DebugUtils/GTMDebugSelectorValidation.h",
"src/DebugUtils/GTMTypeCasting.h",
]
libs = [
"AppKit.framework",
"Carbon.framework",
"Cocoa.framework",
"QuartzCore.framework",
]
# TODO(crbug.com/841631): GTM uses accessibility APIs that are deprecated as
# of 10.10. These can't yet be compiled out, so for now, ignore deprecated
# declarations in GTM altogether.
cflags = [ "-Wno-deprecated-declarations" ]
} else { # is_ios
sources += [
"src/DebugUtils/GTMMethodCheck.h",
"src/DebugUtils/GTMMethodCheck.m",
"src/Foundation/GTMLightweightProxy.h",
"src/Foundation/GTMLightweightProxy.m",
# GTMLogger is used by breakpad, which is still used on iOS.
# GTMLogger and GTMSQLite are used by Phenotype, a dependency of GrowthKit.
"src/Foundation/GTMLogger.h",
"src/Foundation/GTMLogger.m",
"src/Foundation/GTMNSData+zlib.h",
"src/Foundation/GTMNSData+zlib.m",
"src/Foundation/GTMNSDictionary+URLArguments.h",
"src/Foundation/GTMNSDictionary+URLArguments.m",
"src/Foundation/GTMNSString+URLArguments.h",
"src/Foundation/GTMNSString+URLArguments.m",
"src/Foundation/GTMSQLite.h",
"src/Foundation/GTMSQLite.m",
"src/Foundation/GTMStringEncoding.h",
"src/Foundation/GTMStringEncoding.m",
"src/iPhone/GTMFadeTruncatingLabel.h",
"src/iPhone/GTMFadeTruncatingLabel.m",
"src/iPhone/GTMRoundedRectPath.h",
"src/iPhone/GTMRoundedRectPath.m",
"src/iPhone/GTMUIImage+Resize.h",
"src/iPhone/GTMUIImage+Resize.m",
"src/iPhone/GTMUILocalizer.h",
"src/iPhone/GTMUILocalizer.m",
]
# TODO(crbug.com/569158): Suppresses warnings that are treated as errors
# when minimum iOS version support is increased to iOS 9 and up.
# This should be removed once all deprecation violations have been fixed.
cflags = [ "-Wno-deprecated-declarations" ]
libs = [
"sqlite3",
"z",
]
}
if (is_component_build) {
# GTM is third-party code, so we don't want to add _EXPORT
# annotations to it, so build it without -fvisibility=hidden
# (else the interface class symbols will be hidden in a 64bit
# build). Only do this in a component build, so that the shipping
# chrome binary doesn't end up with unnecessarily exported
# symbols.
configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
configs += [ "//build/config/gcc:symbol_visibility_default" ]
}
}