Backed out changeset e721121e5f57 (bug 1761634) for causing several issues with WebDr...
[gecko.git] / dom / geolocation / moz.build
blobef3cef6d049d496bd63cb04a7b2b46c4dcf238c4
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/.
7 with Files("**"):
8     BUG_COMPONENT = ("Core", "DOM: Geolocation")
10 with Files("GeolocationSystemWin.cpp"):
11     BUG_COMPONENT = ("Core", "Widget: Win32")
13 EXPORTS += [
14     "nsGeoPositionIPCSerialiser.h",
17 EXPORTS.mozilla.dom += [
18     "Geolocation.h",
19     "GeolocationCoordinates.h",
20     "GeolocationIPCUtils.h",
21     "GeolocationPosition.h",
22     "GeolocationPositionError.h",
23     "GeolocationSystem.h",
26 SOURCES += [
27     "Geolocation.cpp",
28     "GeolocationCoordinates.cpp",
29     "GeolocationPosition.cpp",
30     "GeolocationPositionError.cpp",
33 UNIFIED_SOURCES += [
34     "MLSFallback.cpp",
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"
42     and CONFIG["MOZ_BUILD_APP"] == "browser"
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     ]
60 include("/ipc/chromium/chromium-config.mozbuild")
62 FINAL_LIBRARY = "xul"
63 LOCAL_INCLUDES += [
64     "/dom/base",
65     "/dom/ipc",
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"]