moz.build (2401B)
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- 2 # vim: set filetype=python: 3 # This Source Code Form is subject to the terms of the Mozilla Public 4 # License, v. 2.0. If a copy of the MPL was not distributed with this 5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7 with Files("**"): 8 BUG_COMPONENT = ("Core", "DOM: Geolocation") 9 10 with Files("GeolocationSystemWin.cpp"): 11 BUG_COMPONENT = ("Core", "Widget: Win32") 12 13 EXPORTS += [ 14 "nsGeoPositionIPCSerialiser.h", 15 ] 16 17 EXPORTS.mozilla.dom += [ 18 "Geolocation.h", 19 "GeolocationCoordinates.h", 20 "GeolocationIPCUtils.h", 21 "GeolocationPosition.h", 22 "GeolocationPositionError.h", 23 "GeolocationSystem.h", 24 ] 25 26 SOURCES += [ 27 "Geolocation.cpp", 28 "GeolocationCoordinates.cpp", 29 "GeolocationPosition.cpp", 30 "GeolocationPositionError.cpp", 31 ] 32 33 UNIFIED_SOURCES += [ 34 "MLSFallback.cpp", 35 ] 36 37 # MinGW is missing the headers needed to build the Windows Geolocation System 38 # Permission UI so it uses the platform-agnostic version. 39 if ( 40 CONFIG["OS_TARGET"] == "WINNT" 41 and (CONFIG["CC_TYPE"] == "clang-cl" or CONFIG["MOZ_ARTIFACT_BUILDS"]) 42 and CONFIG["MOZ_BUILD_APP"] == "browser" 43 ): 44 UNIFIED_SOURCES += [ 45 "GeolocationSystemWin.cpp", 46 ] 47 EXTRA_JS_MODULES += [ 48 "GeolocationUIUtilsWin.sys.mjs", 49 ] 50 XPCOM_MANIFESTS += [ 51 "components.conf", 52 ] 53 XPIDL_SOURCES += ["nsIGeolocationUIUtilsWin.idl"] 54 XPIDL_MODULE = "dom_geolocation" 55 else: 56 UNIFIED_SOURCES += [ 57 "GeolocationSystem.cpp", 58 ] 59 60 include("/ipc/chromium/chromium-config.mozbuild") 61 62 FINAL_LIBRARY = "xul" 63 LOCAL_INCLUDES += [ 64 "/dom/base", 65 "/dom/ipc", 66 ] 67 68 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android": 69 LOCAL_INCLUDES += [ 70 "/dom/system/android", 71 ] 72 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": 73 LOCAL_INCLUDES += [ 74 "/dom/system/mac", 75 ] 76 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows": 77 LOCAL_INCLUDES += [ 78 "/dom/system/windows/location", 79 ] 80 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk": 81 if CONFIG["MOZ_ENABLE_DBUS"]: 82 LOCAL_INCLUDES += ["/dom/system/linux"] 83 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"] 84 85 BROWSER_CHROME_MANIFESTS += ["test/browser/browser.toml"] 86 MOCHITEST_CHROME_MANIFESTS += ["test/chrome/chrome.toml"] 87 MOCHITEST_MANIFESTS += ["test/mochitest/mochitest.toml"] 88 XPCSHELL_TESTS_MANIFESTS += ["test/unit/xpcshell.toml"]