moz.build (1790B)
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 8 if CONFIG["OS_TARGET"] == "WINNT": 9 SOURCES += [ 10 "OculusSession.cpp", 11 "OpenVRWMRMapper.cpp", 12 ] 13 14 # Build OSVR on all platforms except Android 15 if 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. 30 # TARGET_OS shadows target.os in our configure system, so we can check that to 31 # get Windows and macOS, but not Linux. For Linux we check OS_TARGET which 32 # generifies to "Linux" for all Linux distros. 33 if CONFIG["TARGET_OS"] in ("WINNT", "OSX") or CONFIG["OS_TARGET"] == "Linux": 34 DIRS += [ 35 "openvr", 36 ] 37 LOCAL_INCLUDES += ["/dom/base", "/gfx/layers/d3d11"] 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 51 FINAL_LIBRARY = "xul"