Add NDK build files

This commit is contained in:
dan sinclair
2018-11-26 16:27:55 -05:00
parent fb7a7ea2df
commit 5ba79d5904
4 changed files with 136 additions and 0 deletions

12
ndk_test/Android.mk Normal file
View File

@@ -0,0 +1,12 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_CPP_EXTENSION := .cc .cpp .cxx
LOCAL_SRC_FILES:=test.cpp
LOCAL_MODULE:=glslang_ndk_test
LOCAL_LDLIBS:=-landroid
LOCAL_CXXFLAGS:=-std=c++11 -fno-exceptions -fno-rtti -Werror
LOCAL_STATIC_LIBRARIES:=glslang SPIRV HLSL
include $(BUILD_SHARED_LIBRARY)
include $(LOCAL_PATH)/../Android.mk

View File

@@ -0,0 +1,5 @@
APP_ABI := all
APP_BUILD_SCRIPT := Android.mk
APP_STL := gnustl_static
APP_PLATFORM := android-9
NDK_TOOLCHAIN_VERSION := 4.9

19
ndk_test/test.cpp Normal file
View File

@@ -0,0 +1,19 @@
// Copyright 2018 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "SPIRV/GlslangToSpv.h"
void android_main(struct android_app* state) {
int version = glslang::GetSpirvGeneratorVersion();
}