mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-27 00:51:46 +00:00
inc/xrt: Add Android config header to store package name.
This commit is contained in:
parent
b90dc8fdea
commit
0f43bbe924
|
@ -178,6 +178,17 @@ cmake_dependent_option(XRT_BUILD_DRIVER_SURVIVE "Enable libsurvive driver" OFF "
|
|||
# All drivers must be listed in here to be included in the generated header!
|
||||
list(APPEND AVAILABLE_DRIVERS ARDUINO DUMMY HDK HYDRA NS OHMD PSMV PSVR RS V4L2 VIVE DAYDREAM REMOTE SURVIVE)
|
||||
|
||||
|
||||
# Package name needs to be known by the native code itself.
|
||||
# Can be overridden from outside/command line
|
||||
if(ANDROID AND NOT XRT_ANDROID_PACKAGE)
|
||||
if(XRT_FEATURE_SERVICE)
|
||||
set(XRT_ANDROID_PACKAGE "org.freedesktop.monado.openxr_runtime.out_of_process")
|
||||
else()
|
||||
set(XRT_ANDROID_PACKAGE "org.freedesktop.monado.openxr_runtime.in_process")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
###
|
||||
# Flags
|
||||
###
|
||||
|
|
|
@ -30,3 +30,9 @@ configure_file(
|
|||
${CMAKE_CURRENT_BINARY_DIR}/xrt_config_vulkan.h
|
||||
@ONLY
|
||||
)
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/xrt_config_android.h.cmake_in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/xrt_config_android.h
|
||||
@ONLY
|
||||
)
|
||||
|
|
12
src/xrt/include/xrt/xrt_config_android.h.cmake_in
Normal file
12
src/xrt/include/xrt/xrt_config_android.h.cmake_in
Normal file
|
@ -0,0 +1,12 @@
|
|||
// Copyright 2020, Collabora, Ltd.
|
||||
// SPDX-License-Identifier: BSL-1.0
|
||||
/*!
|
||||
* @file
|
||||
* @brief Android defines.
|
||||
* @author Ryan Pavlik <ryan.pavlik@collabora.com>
|
||||
* @ingroup xrt_iface
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#cmakedefine XRT_ANDROID_PACKAGE "@XRT_ANDROID_PACKAGE@"
|
Loading…
Reference in a new issue