mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-06-12 00:20:53 +02:00
Add polyvox, fix task copy bugs
This commit is contained in:
parent
d6072f2bf2
commit
ddc2548c53
6 changed files with 70 additions and 4 deletions
|
@ -12,9 +12,10 @@ target_link_libraries(native-lib "${HIFI_ANDROID_PRECOMPILED}/jni/arm64-v8a/libg
|
||||||
# networking -> openssl, tbb
|
# networking -> openssl, tbb
|
||||||
# fbx -> draco
|
# fbx -> draco
|
||||||
# physics -> bullet
|
# physics -> bullet
|
||||||
|
# entities-renderer -> polyvox
|
||||||
|
|
||||||
# unfinished libraries
|
# unfinished libraries
|
||||||
# image -> nvtt (doesn't look good, but can be made optional)
|
# image -> nvtt (doesn't look good, but can be made optional)
|
||||||
# script-engine -> quazip (probably not required for the android client)
|
# script-engine -> quazip (probably not required for the android client)
|
||||||
# entities-renderer -> polyvox
|
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,9 @@ setupDependencies.dependsOn setupDraco
|
||||||
apply from: 'setupBullet.gradle'
|
apply from: 'setupBullet.gradle'
|
||||||
setupDependencies.dependsOn setupBullet
|
setupDependencies.dependsOn setupBullet
|
||||||
|
|
||||||
|
apply from: 'setupPolyvox.gradle'
|
||||||
|
setupDependencies.dependsOn setupPolyvox
|
||||||
|
|
||||||
task copyDependencies(type: Copy) {
|
task copyDependencies(type: Copy) {
|
||||||
from HIFI_ANDROID_PRECOMPILED + '/jni/arm64-v8a'
|
from HIFI_ANDROID_PRECOMPILED + '/jni/arm64-v8a'
|
||||||
into 'app/src/main/jniLibs/arm64-v8a'
|
into 'app/src/main/jniLibs/arm64-v8a'
|
||||||
|
|
38
android/setupPolyvox.gradle
Normal file
38
android/setupPolyvox.gradle
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
buildscript {
|
||||||
|
repositories {
|
||||||
|
jcenter()
|
||||||
|
google()
|
||||||
|
}
|
||||||
|
dependencies {
|
||||||
|
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||||
|
classpath 'de.undercouch:gradle-download-task:3.3.0'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def file='polyvox_armv8-libcpp.tgz'
|
||||||
|
def url='https://hifi-public.s3.amazonaws.com/austin/android/' + file
|
||||||
|
def destFile = new File(HIFI_ANDROID_PRECOMPILED, file)
|
||||||
|
|
||||||
|
task downloadPolyvox(type: de.undercouch.gradle.tasks.download.Download) {
|
||||||
|
src url
|
||||||
|
dest destFile
|
||||||
|
}
|
||||||
|
|
||||||
|
task extractPolyvox(dependsOn: downloadPolyvox, type: Copy) {
|
||||||
|
from tarTree(resources.gzip(destFile))
|
||||||
|
into new File(HIFI_ANDROID_PRECOMPILED, 'polyvox')
|
||||||
|
}
|
||||||
|
|
||||||
|
task copyPolyvoxCore(dependsOn: extractPolyvox, type: Copy) {
|
||||||
|
from HIFI_ANDROID_PRECOMPILED + '/polyvox/lib/Release'
|
||||||
|
include 'libPolyVoxCore.so'
|
||||||
|
into HIFI_ANDROID_PRECOMPILED + '/jni/arm64-v8a'
|
||||||
|
}
|
||||||
|
|
||||||
|
task copyPolyvoxUtil(dependsOn: extractPolyvox, type: Copy) {
|
||||||
|
from HIFI_ANDROID_PRECOMPILED + '/polyvox/lib'
|
||||||
|
include 'libPolyVoxUtil.so'
|
||||||
|
into HIFI_ANDROID_PRECOMPILED + '/jni/arm64-v8a'
|
||||||
|
}
|
||||||
|
|
||||||
|
task setupPolyvox(dependsOn: [copyPolyvoxCore, copyPolyvoxUtil]) { }
|
|
@ -33,13 +33,13 @@ task extractQt(dependsOn: downloadQt, type: Copy) {
|
||||||
}
|
}
|
||||||
|
|
||||||
task copyQtJars(dependsOn: extractQt, type: Copy) {
|
task copyQtJars(dependsOn: extractQt, type: Copy) {
|
||||||
from 'build/qt/jar'
|
from HIFI_ANDROID_PRECOMPILED + '/qt/jar'
|
||||||
include '*.jar'
|
include '*.jar'
|
||||||
into HIFI_ANDROID_PRECOMPILED + '/jar'
|
into HIFI_ANDROID_PRECOMPILED + '/jar'
|
||||||
}
|
}
|
||||||
|
|
||||||
task copyQtLibs(dependsOn: extractQt, type: Copy) {
|
task copyQtLibs(dependsOn: extractQt, type: Copy) {
|
||||||
from 'build/qt/lib'
|
from HIFI_ANDROID_PRECOMPILED + '/qt/lib'
|
||||||
include 'libQt5AndroidExtras.so'
|
include 'libQt5AndroidExtras.so'
|
||||||
include 'libQt5Concurrent.so'
|
include 'libQt5Concurrent.so'
|
||||||
include 'libQt5Core.so'
|
include 'libQt5Core.so'
|
||||||
|
|
|
@ -24,7 +24,7 @@ task extractTBB(dependsOn: downloadTBB, type: Copy) {
|
||||||
}
|
}
|
||||||
|
|
||||||
task setupTBB(dependsOn: extractTBB, type: Copy) {
|
task setupTBB(dependsOn: extractTBB, type: Copy) {
|
||||||
from 'build/tbb/lib/release'
|
from HIFI_ANDROID_PRECOMPILED + '/tbb/lib/release'
|
||||||
include 'libtbb.so'
|
include 'libtbb.so'
|
||||||
include 'libtbbmalloc.so'
|
include 'libtbbmalloc.so'
|
||||||
into HIFI_ANDROID_PRECOMPILED + '/jni/arm64-v8a/'
|
into HIFI_ANDROID_PRECOMPILED + '/jni/arm64-v8a/'
|
||||||
|
|
24
cmake/macros/TargetPolyvox.cmake
Normal file
24
cmake/macros/TargetPolyvox.cmake
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
#
|
||||||
|
# Copyright 2015 High Fidelity, Inc.
|
||||||
|
# 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_POLYVOX)
|
||||||
|
if (ANDROID)
|
||||||
|
set(INSTALL_DIR ${HIFI_ANDROID_PRECOMPILED}/polyvox)
|
||||||
|
set(POLYVOX_INCLUDE_DIRS "${INSTALL_DIR}/include" CACHE TYPE 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()
|
||||||
|
add_dependency_external_projects(polyvox)
|
||||||
|
find_package(PolyVox REQUIRED)
|
||||||
|
endif()
|
||||||
|
target_include_directories(${TARGET_NAME} SYSTEM PUBLIC ${POLYVOX_INCLUDE_DIRS})
|
||||||
|
target_link_libraries(${TARGET_NAME} ${POLYVOX_LIBRARIES})
|
||||||
|
endmacro()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue