From a30395e945e4f7f2f445687b47ae592f39d77122 Mon Sep 17 00:00:00 2001 From: Bradley Austin Davis Date: Tue, 28 Nov 2017 13:45:49 -0800 Subject: [PATCH] Tweaking android cmake --- android/app/CMakeLists.txt | 18 +++--------------- cmake/macros/TargetGoogleVR.cmake | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 15 deletions(-) create mode 100644 cmake/macros/TargetGoogleVR.cmake diff --git a/android/app/CMakeLists.txt b/android/app/CMakeLists.txt index 8b36f8a1fb..3d4516d0bf 100644 --- a/android/app/CMakeLists.txt +++ b/android/app/CMakeLists.txt @@ -1,22 +1,10 @@ set(TARGET_NAME native-lib) setup_hifi_library() link_hifi_libraries(shared networking gl gpu gpu-gles image fbx render-utils physics) -target_opengl() + target_link_libraries(native-lib android log m) -set(GVR_ROOT "${HIFI_ANDROID_PRECOMPILED}/gvr/gvr-android-sdk-1.101.0/") -target_include_directories(native-lib PRIVATE "${GVR_ROOT}/libraries/headers") -target_link_libraries(native-lib "${GVR_ROOT}/libraries/libgvr.so") - -# finished libraries -# core -> qt -# networking -> openssl, tbb -# fbx -> draco -# physics -> bullet -# entities-renderer -> polyvox - -# unfinished libraries -# image -> nvtt (doesn't look good, but can be made optional) -# script-engine -> quazip (probably not required for the android client) +target_opengl() +target_googlevr() diff --git a/cmake/macros/TargetGoogleVR.cmake b/cmake/macros/TargetGoogleVR.cmake new file mode 100644 index 0000000000..eca5d655f9 --- /dev/null +++ b/cmake/macros/TargetGoogleVR.cmake @@ -0,0 +1,14 @@ +# +# 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_GOOGLEVR) + if (ANDROID) + set(GVR_ROOT "${HIFI_ANDROID_PRECOMPILED}/gvr/gvr-android-sdk-1.101.0/") + target_include_directories(native-lib PRIVATE "${GVR_ROOT}/libraries/headers") + target_link_libraries(native-lib "${GVR_ROOT}/libraries/libgvr.so") + endif() +endmacro()