Professional Documents
Culture Documents
#
# 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.
# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html
# Sets the minimum version of CMake required to build the native library.
cmake_minimum_required(VERSION 3.10.2)
project("VHCode")
set(can_use_assembler TRUE)
enable_language(ASM)
set_source_files_properties(termux-bootstrap-zip.S termux-bootstrap.c
PROPERTIES COMPILE_FLAGS "-std=c11 -Wall -Wextra -Werror -Os -fno-stack-
protector"
)
include_directories(.)
set_source_files_properties(vsc-bootstrap-zip.S vsc-bootstrap.c
PROPERTIES COMPILE_FLAGS "-std=c11 -Wall -Wextra -Werror -Os -fno-stack-
protector"
)
include_directories(.)
add_library(vsc-bootstrap SHARED vsc-bootstrap-zip.S vsc-bootstrap.c)
#TODO check that the definitions are all needed. Do they have impact outside of our
code?
if(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7-a)
add_definitions(-DARCH_ARM_USE_INTRINSICS -DARCH_ARM_HAVE_VFP)
set(ASM_SOURCES
bitmap/Blend_neon.S
bitmap/Blur_neon.S
# ColorMatrix_neon.S
# Convolve_neon.S
# Lut3d_neon.S
# Resize_neon.S
# YuvToRgb_neon.S
)
endif()
cpufeatures
jnigraphics
# Links the target library to the log library
# included in the NDK.
${log-lib} )
include(AndroidNdkModules)
android_ndk_import_module_cpufeatures()