Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2013-2019 High Fidelity, Inc.
# Copyright 2019-2021 Vircadia contributors.
# Copyright 2020-2025 Overte e.V.
# Copyright 2020-2026 Overte e.V.
# SPDX-License-Identifier: Apache-2.0

# As the official CMake documentation is pretty bad for non-experts, Craig Scott's "Professional CMake: A Practical Guide" is a worthwhile investment,
Expand Down Expand Up @@ -141,7 +141,7 @@ if (ANDROID)
add_definitions(-DANDROID_APP_INTERFACE)
endif()
else ()
set(PLATFORM_QT_COMPONENTS WebEngine Xml)
set(PLATFORM_QT_COMPONENTS WebEngine WebChannel WebEngineCore WebEngineWidgets Xml)
endif()


Expand Down
12 changes: 7 additions & 5 deletions cmake/macros/TargetBreakpad.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
#
# Copyright 2018 High Fidelity, Inc.
# Copyright 2026 Overte e.V.
# Created by Gabriel Calero & Cristian Duarte on 2018/03/13
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(TARGET_BREAKPAD)
if (ANDROID)
set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/breakpad)
set(BREAKPAD_INCLUDE_DIRS "${INSTALL_DIR}/include" CACHE STRING INTERNAL)
set(LIB_DIR ${INSTALL_DIR}/lib)
list(APPEND BREAKPAD_LIBRARIES ${LIB_DIR}/libbreakpad_client.a)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BREAKPAD_INCLUDE_DIRS})
# FIXME: Get from Conan instead.
# set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/breakpad)
# set(BREAKPAD_INCLUDE_DIRS "${INSTALL_DIR}/include" CACHE STRING INTERNAL)
# set(LIB_DIR ${INSTALL_DIR}/lib)
# list(APPEND BREAKPAD_LIBRARIES ${LIB_DIR}/libbreakpad_client.a)
# target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${BREAKPAD_INCLUDE_DIRS})
if (USE_BREAKPAD)
add_definitions(-DHAS_BREAKPAD)
endif()
Expand Down
15 changes: 7 additions & 8 deletions cmake/macros/TargetDraco.cmake
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
#
# Copyright 2017-2020 High Fidelity, Inc.
# Copyright 2023-2026 Overte e.V.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(TARGET_DRACO)
if (OVERTE_USE_SYSTEM_LIBS)
find_package(PkgConfig REQUIRED)
pkg_check_modules(Draco REQUIRED draco)
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${Draco_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} ${Draco_LINK_LIBRARIES})
elseif (ANDROID)
set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/draco)
set(DRACO_INCLUDE_DIRS "${INSTALL_DIR}/include" CACHE STRING INTERNAL)
set(LIB_DIR ${INSTALL_DIR}/lib)
list(APPEND DRACO_LIBRARIES ${LIB_DIR}/libdraco.a)
list(APPEND DRACO_LIBRARIES ${LIB_DIR}/libdracodec.a)
list(APPEND DRACO_LIBRARIES ${LIB_DIR}/libdracoenc.a)
target_link_libraries(${TARGET_NAME} ${DRACO_LIBRARIES})
else()
find_package(draco REQUIRED)
target_link_libraries(${TARGET_NAME} draco::draco)
Expand Down
12 changes: 2 additions & 10 deletions cmake/macros/TargetEtc2Comp.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#
# Copyright 2018 High Fidelity, Inc.
# Copyright 2026 Overte e.V.
# Created by Sam Gondelman on 5/2/2018
#
# Distributed under the Apache License, Version 2.0.
Expand All @@ -12,16 +13,7 @@ macro(TARGET_ETC2COMP)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${ETC2COMP_INCLUDE_DIRS} "${ETC2COMP_INCLUDE_DIRS}/EtcLib/Etc" "${ETC2COMP_INCLUDE_DIRS}/EtcLib/EtcCodec")
target_link_libraries(${TARGET_NAME} libEtcLib.a)
else()
if (ANDROID)
set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/etc2comp)
set(ETC2COMP_INCLUDE_DIRS "${INSTALL_DIR}/include" "${INSTALL_DIR}/include/Etc" "${INSTALL_DIR}/include/EtcCodec")
set(ETC2COMP_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libEtcLib.a)
set(ETC2COMP_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libEtcLib.a)
target_include_directories(${TARGET_NAME} PRIVATE ${ETC2COMP_INCLUDE_DIRS})
else()
find_package(etc2comp REQUIRED)
endif()

find_package(etc2comp REQUIRED)
target_link_libraries(${TARGET_NAME} etc2comp::etc2comp)
endif()
endmacro()
Expand Down
16 changes: 5 additions & 11 deletions cmake/macros/TargetGlad.cmake
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
#
# Copyright 2015 High Fidelity, Inc.
# Copyright 2026 Overte e.V.
# Created by Bradley Austin Davis on 2015/10/10
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
#
macro(TARGET_GLAD)
if (ANDROID)
include(SelectLibraryConfigurations)
set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/glad)
set(GLAD_INCLUDE_DIRS "${INSTALL_DIR}/include")
set(GLAD_LIBRARY_DEBUG ${INSTALL_DIR}/lib/libglad_d.a)
set(GLAD_LIBRARY_RELEASE ${INSTALL_DIR}/lib/libglad.a)
select_library_configurations(GLAD)
find_library(EGL EGL)
target_link_libraries(${TARGET_NAME} ${EGL})
find_package(OpenGL COMPONENTS EGL GLES2 GLES3 REQUIRED)
find_package(glad REQUIRED)
target_link_libraries(${TARGET_NAME} OpenGL::EGL OpenGL::GLES2 OpenGL::GLES3 glad::glad)
else()
find_package(OpenGL REQUIRED)
find_package(glad REQUIRED)
target_link_libraries(${TARGET_NAME} OpenGL::GL glad::glad)
endif()

target_link_libraries(${TARGET_NAME} OpenGL::GL glad::glad)
# target_link_libraries(${TARGET_NAME} ${GLAD_EXTRA_LIBRARIES})
endmacro()
16 changes: 2 additions & 14 deletions cmake/macros/TargetNvtt.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#
# Copyright 2015 High Fidelity, Inc.
# Copyright 2026 Overte e.V.
# Created by Bradley Austin Davis on 2015/10/10
#
# Distributed under the Apache License, Version 2.0.
Expand All @@ -17,20 +18,7 @@ macro(TARGET_NVTT)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${NVTT_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} ${NVTT_LIBRARY} ${NVIMAGE_LIBRARY} ${NVMATH_LIBRARY} ${NVCORE_LIBRARY} ${NVTHREAD_LIBRARY})
else()
if (ANDROID)
set(NVTT_INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/nvtt)
set(NVTT_LIB_DIR "${NVTT_INSTALL_DIR}/lib")
set(NVTT_INCLUDE_DIRS "${NVTT_INSTALL_DIR}/include" CACHE STRING INTERNAL)
list(APPEND NVTT_LIBS "${NVTT_LIB_DIR}/libnvcore.so")
list(APPEND NVTT_LIBS "${NVTT_LIB_DIR}/libnvmath.so")
list(APPEND NVTT_LIBS "${NVTT_LIB_DIR}/libnvimage.so")
list(APPEND NVTT_LIBS "${NVTT_LIB_DIR}/libnvtt.so")
set(NVTT_LIBRARIES ${NVTT_LIBS} CACHE STRING INTERNAL)
target_include_directories(${TARGET_NAME} PRIVATE ${NVTT_INCLUDE_DIRS})
else()
find_package(nvidia-texture-tools REQUIRED)
endif()

find_package(nvidia-texture-tools REQUIRED)
target_link_libraries(${TARGET_NAME} nvidia-texture-tools::nvidia-texture-tools)
endif()

Expand Down
12 changes: 2 additions & 10 deletions cmake/macros/TargetPolyvox.cmake
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#
# Created by Bradley Austin Davis on 2017/11/28
# Copyright 2013-2017 High Fidelity, Inc.
# Copyright 2026 Overte e.V.
#
# Distributed under the Apache License, Version 2.0.
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
Expand All @@ -11,16 +12,7 @@ macro(TARGET_POLYVOX)
target_include_directories(${TARGET_NAME} SYSTEM PRIVATE ${PolyVox_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} ${PolyVox_LIBRARIES})
else()
if (ANDROID)
set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/polyvox)
set(POLYVOX_INCLUDE_DIRS "${INSTALL_DIR}/include" CACHE STRING INTERNAL)
set(LIB_DIR ${INSTALL_DIR}/lib)
list(APPEND POLYVOX_LIBRARIES ${LIB_DIR}/libPolyVoxUtil.so)
list(APPEND POLYVOX_LIBRARIES ${LIB_DIR}/Release/libPolyVoxCore.so)
else()
find_package(polyvox REQUIRED)
endif()
find_package(polyvox REQUIRED)
target_link_libraries(${TARGET_NAME} polyvox::polyvox)
endif()
endmacro()

3 changes: 2 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def requirements(self):
self.requires("nvidia-texture-tools/2023.01@overte/stable")
self.requires("onetbb/2021.10.0")
self.requires("openexr/3.1.9")
self.requires("openvr/2.2.3@overte/stable")
if self.settings.os != "Android":
self.requires("openvr/2.2.3@overte/stable")
self.requires("openxr/1.1.46@overte/stable")
self.requires("opus/1.4")
self.requires("polyvox/2025.09.19@overte/experimental#76ce908c1078988dceae5ad32ead2909")
Expand Down
13 changes: 7 additions & 6 deletions interface/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2013-2019 High Fidelity, Inc.
# Copyright 2019-2021 Vircadia contributors
# Copyright 2021-2023 Overte e.V.
# Copyright 2021-2026 Overte e.V.
# SPDX-License-Identifier: Apache-2.0

if (APPLE)
Expand Down Expand Up @@ -42,6 +42,7 @@ set(RESOURCES_RCC ${CMAKE_CURRENT_BINARY_DIR}/resources.rcc)
generate_qrc(OUTPUT ${RESOURCES_QRC} PATH ${CMAKE_CURRENT_SOURCE_DIR}/resources CUSTOM_PATHS ${CUSTOM_INTERFACE_QRC_PATHS} GLOBS *)

if (ANDROID)
# ANDROID TODO: Is this still needed?
# on Android, don't compress the rcc binary
qt5_add_binary_resources(resources "${RESOURCES_QRC}" DESTINATION "${RESOURCES_RCC}" OPTIONS -no-compress)
else ()
Expand Down Expand Up @@ -117,6 +118,7 @@ set(INTERFACE_SRCS ${INTERFACE_SRCS} "${QT_UI_HEADERS}" "${QT_RESOURCES}")

# setup the android parameters that will help us produce an APK
if (ANDROID)
# ANDROID TODO: Get from a Conan Setting named `android_sdk` like Qt does.
set(ANDROID_SDK_ROOT $ENV{ANDROID_HOME})
set(BUILD_SHARED_LIBS ON)
endif ()
Expand Down Expand Up @@ -296,11 +298,10 @@ if (ANDROID)
endif ()

target_link_libraries(
${TARGET_NAME}
Qt5::Gui Qt5::Network Qt5::Multimedia Qt5::Widgets
Qt5::Qml Qt5::Quick Qt5::Svg
Qt5::WebChannel Qt5::WebEngineCore Qt5::WebEngineWidgets
${PLATFORM_QT_LIBRARIES}
${TARGET_NAME}
Qt5::Gui Qt5::Network Qt5::Multimedia Qt5::Widgets
Qt5::Qml Qt5::Quick Qt5::Svg
${PLATFORM_QT_LIBRARIES}
)

if (UNIX AND NOT ANDROID AND NOT OVERTE_THREAD_DEBUGGING)
Expand Down
45 changes: 45 additions & 0 deletions tools/conan-profiles/android
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
include(default)

[settings]
os=Android
# I would like to support API level 29, which is the latest available on the Oculus Quest 1.
# API level 33 is the minimum supported by NVTT currently, because it uses `backtrace_symbols` and similar functionality in nvcore/Debug.cpp.
# For a list of standard library functions: https://android.googlesource.com/platform/bionic/+/HEAD/docs/status.md
os.api_level=33
arch=armv8
compiler=clang
# Get the clang version by running something like:
# `/usr/lib/android-sdk/ndk/27.3.13750724/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android29-clang --version`
compiler.version=18
compiler.libcxx=c++_shared
compiler.cppstd=20

[conf]
# We should probably use whatever NDK Qt tells us to: https://doc.qt.io/qt-6/android.html
# This is the default when installing google-android-ndk-r27d-installer on Debian
tools.android:ndk_path=/usr/lib/android-sdk/ndk/27.3.13750724/

[options]
# This is the default when installing Android SDKs through Android Studio
# Make sure you have the Android Platform SDK for the os.api_level in here.
qt*:android_sdk={{ os.path.expanduser("~") }}/Android/Sdk

Overte/*:qt_source=source
qt*:opengl=es2
# Used by Overte Interface.
qt*:qtandroidextras=True
# QtWebengine is not supported on Android.
qt*:qtwebengine=False
# Avoid build errors in qt5/qtlocation/src/3rdparty/mapbox-gl-native/deps/boost/1.65.1/include/boost/
# We don't need this anyway, since we are building without QtWebengine
qt*:qtlocation=False

# Fails on trying to build Open Sound System support.
qt*:with_openal=False
# No Android cross compilation
qt*:with_mysql=False
# PostgreSQL
qt*:with_pq=False
# Open Database Connectivity
# Dependency,`m4`, fails to build.
qt*:with_odbc=False
Loading