This repository has been archived by the owner on Nov 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
359 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file renamed
BIN
+31.2 KB
libraries/sdk-commonwidget-1.130.0.aar → libraries/sdk-commonwidget-1.140.0.aar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# For more information about using CMake with Android Studio, read the | ||
# documentation: https://d.android.com/studio/projects/add-native-code.html | ||
|
||
cmake_minimum_required(VERSION 3.4.1) | ||
|
||
# Configure the sample code. | ||
file(GLOB native_srcs "src/main/jni/*.cc") | ||
add_library(controllerpaint_jni | ||
SHARED | ||
${native_srcs}) | ||
|
||
# Include the GVR headers & libraries. | ||
include_directories(${GVR_INCLUDE}) | ||
|
||
add_library(gvr-lib SHARED IMPORTED) | ||
set_target_properties( | ||
gvr-lib | ||
PROPERTIES IMPORTED_LOCATION ${GVR_LIBPATH}/${ANDROID_ABI}/libgvr.so) | ||
|
||
# Include general Android libraries. | ||
find_library(android-lib android) | ||
find_library(EGL-lib EGL) | ||
find_library(GLESv2-lib GLESv2) | ||
find_library(log-lib log) | ||
|
||
# Build final libcontrollerpaint_jni.so | ||
target_link_libraries(controllerpaint_jni | ||
gvr-lib | ||
|
||
${android-lib} | ||
${EGL-lib} | ||
${GLESv2-lib} | ||
${log-lib} ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,48 @@ | ||
apply plugin: 'com.android.model.application' | ||
apply plugin: 'com.android.application' | ||
|
||
model { | ||
android { | ||
compileSdkVersion = 26 | ||
buildToolsVersion = "26.0.0" | ||
|
||
defaultConfig.with { | ||
applicationId = "com.google.vr.ndk.samples.controllerpaint" | ||
minSdkVersion.apiLevel = 24 | ||
targetSdkVersion.apiLevel = 24 | ||
versionCode = 1 | ||
versionName = "1.0" | ||
android { | ||
compileSdkVersion 26 | ||
defaultConfig { | ||
applicationId "com.google.vr.ndk.samples.controllerpaint" | ||
minSdkVersion 24 | ||
targetSdkVersion 24 | ||
versionCode 1 | ||
versionName "1.0" | ||
externalNativeBuild { | ||
cmake { | ||
cppFlags "-std=gnu++11" | ||
arguments "-DGVR_LIBPATH=${project.rootDir}/libraries/jni", | ||
"-DGVR_INCLUDE=${project.rootDir}/libraries/headers" | ||
} | ||
} | ||
} | ||
android.buildTypes { | ||
release { | ||
minifyEnabled = true | ||
proguardFiles.add(file('../../proguard-gvr.txt')) | ||
buildTypes { | ||
release { | ||
minifyEnabled = true | ||
proguardFiles.add(file("${project.rootDir}/proguard-gvr.txt")) | ||
} | ||
} | ||
} | ||
android.ndk { | ||
moduleName = "controllerpaint_jni" | ||
cppFlags.add("-std=c++11") | ||
cppFlags.add("-I" + file("src/main/jni").absolutePath) | ||
// Add the necessary GVR headers. | ||
cppFlags.add("-I" + file("${project.rootDir}/libraries/headers").absolutePath) | ||
|
||
stl = "gnustl_shared" | ||
// Add the necessary GVR .so files for all architectures. | ||
ldFlags.add("-L" + file("${project.rootDir}/libraries/jni/arm64-v8a").absolutePath) | ||
ldFlags.add("-L" + file("${project.rootDir}/libraries/jni/armeabi-v7a").absolutePath) | ||
ldFlags.add("-L" + file("${project.rootDir}/libraries/jni/x86").absolutePath) | ||
|
||
ldLibs.addAll(["log", "android", "EGL", "GLESv2"]) | ||
|
||
// Specific the particular .so files this sample links against. | ||
ldLibs.add("gvr") | ||
} | ||
android.productFlavors { | ||
create ("fat") { | ||
ndk { | ||
// This sample builds all architectures by default. Note that if you | ||
// only want to build for a specific architecture, you need to | ||
// remove the appropriate lines below. You also need to remove the | ||
// .so files from the apk using | ||
// "packagingOptions {exclude('lib/armeabi-v7a/*')}" in the android | ||
// section. | ||
ndk.abiFilters.add("arm64-v8a") | ||
ndk.abiFilters.add("armeabi-v7a") | ||
ndk.abiFilters.add("x86") | ||
abiFilters "arm64-v8a" | ||
abiFilters "armeabi-v7a" | ||
abiFilters "x86" | ||
} | ||
} | ||
externalNativeBuild { | ||
cmake { | ||
path "CMakeLists.txt" | ||
} | ||
} | ||
} | ||
|
||
|
||
dependencies { | ||
compile 'com.google.vr:sdk-base:1.130.0' | ||
compile 'com.google.vr:sdk-base:1.140.0' | ||
} | ||
|
||
build.dependsOn(':extractNdk') | ||
build.dependsOn(':extractNdk') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.