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# Build Oculus support on Windows only
8if CONFIG['OS_TARGET'] == 'WINNT':
9    SOURCES += [
10        'OculusSession.cpp',
11        'OpenVRWMRMapper.cpp',
12    ]
13
14# Build OSVR on all platforms except Android
15if CONFIG['OS_TARGET'] != 'Android':
16    UNIFIED_SOURCES += [
17        'OSVRSession.cpp',
18        'VRService.cpp',
19        'VRSession.cpp',
20    ]
21    # PuppetSession includes MacIOSurface.h which includes Mac headers
22    # which define Size and Points types in the root namespace that
23    # often conflict with our own types.
24    SOURCES += [
25        'PuppetSession.cpp',
26    ]
27    include('/ipc/chromium/chromium-config.mozbuild')
28
29# Build OpenVR on Windows, Linux, and macOS desktop targets
30if CONFIG['OS_TARGET'] in ('WINNT', 'Linux', 'Darwin'):
31    DIRS += [
32        'openvr',
33    ]
34    LOCAL_INCLUDES += [
35        '/dom/base',
36        '/gfx/layers/d3d11'
37    ]
38
39    # OpenVRSession includes MacIOSurface.h which includes Mac headers
40    # which define Size and Points types in the root namespace that
41    # often conflict with our own types.
42    SOURCES += [
43        'OpenVRControllerMapper.cpp',
44        'OpenVRCosmosMapper.cpp',
45        'OpenVRDefaultMapper.cpp',
46        'OpenVRKnucklesMapper.cpp',
47        'OpenVRSession.cpp',
48        'OpenVRViveMapper.cpp',
49    ]
50
51FINAL_LIBRARY = 'xul'
52