Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
fa667eb6de
6 changed files with 5 additions and 136 deletions
|
@ -1,28 +0,0 @@
|
||||||
LOCAL_PATH := $(call my-dir)
|
|
||||||
|
|
||||||
include $(CLEAR_VARS)
|
|
||||||
|
|
||||||
ifneq ($(OSMAND_BUILDING_NEON_LIBRARY),true)
|
|
||||||
LOCAL_MODULE := OsmAndJNI
|
|
||||||
else
|
|
||||||
LOCAL_MODULE := OsmAndJNI_neon
|
|
||||||
LOCAL_ARM_NEON := true
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(LOCAL_ARM_NEON),true)
|
|
||||||
OSMAND_BINARY_SUFFIX := _neon
|
|
||||||
else
|
|
||||||
OSMAND_BINARY_SUFFIX :=
|
|
||||||
endif
|
|
||||||
|
|
||||||
LOCAL_STATIC_LIBRARIES := OsmAndCore$(OSMAND_BINARY_SUFFIX)
|
|
||||||
|
|
||||||
ifneq ($(OSMAND_USE_PREBUILT),true)
|
|
||||||
LOCAL_SRC_FILES := c-src/swig.cpp
|
|
||||||
|
|
||||||
include $(BUILD_SHARED_LIBRARY)
|
|
||||||
else
|
|
||||||
LOCAL_SRC_FILES := \
|
|
||||||
$(OSMAND_ANDROID_PREBUILT_ROOT)/$(TARGET_ARCH_ABI)/lib$(LOCAL_MODULE).so
|
|
||||||
include $(PREBUILT_SHARED_LIBRARY)
|
|
||||||
endif
|
|
|
@ -1,89 +0,0 @@
|
||||||
project(OsmAndJNI)
|
|
||||||
|
|
||||||
find_package(Java REQUIRED)
|
|
||||||
find_package(JNI REQUIRED)
|
|
||||||
|
|
||||||
set(target_specific_private_includes "")
|
|
||||||
set(target_specific_public_libraries "")
|
|
||||||
|
|
||||||
file(GLOB_RECURSE core_includes "${OSMAND_ROOT}/core/include/*.h*")
|
|
||||||
file(GLOB_RECURSE core_headers "${OSMAND_ROOT}/core/src/*.h*")
|
|
||||||
file(GLOB_RECURSE core_sources "${OSMAND_ROOT}/core/src/*.c*")
|
|
||||||
file(GLOB_RECURSE core_headers_client "${OSMAND_ROOT}/core/client/*.h*")
|
|
||||||
file(GLOB_RECURSE core_sources_client "${OSMAND_ROOT}/core/client/*.c*")
|
|
||||||
file(GLOB core_swig "${OSMAND_ROOT}/core.swig")
|
|
||||||
file(GLOB_RECURSE core_swig_subfiles "${OSMAND_ROOT}/swig/*")
|
|
||||||
|
|
||||||
set(OsmAndJNI_generated_cpp
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/c-src/swig.cpp"
|
|
||||||
)
|
|
||||||
if(CMAKE_HOST_WIN32 AND NOT CYGWIN)
|
|
||||||
add_custom_command(OUTPUT ${OsmAndJNI_generated_cpp}
|
|
||||||
COMMAND bash ARGS --login "${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
|
||||||
DEPENDS
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
|
||||||
${core_includes}
|
|
||||||
${core_headers}
|
|
||||||
${core_sources}
|
|
||||||
${core_headers_client}
|
|
||||||
${core_sources_client}
|
|
||||||
${core_swig}
|
|
||||||
${core_swig_subfiles}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
|
||||||
COMMENT "Generating sources...")
|
|
||||||
else()
|
|
||||||
add_custom_command(OUTPUT ${OsmAndJNI_generated_cpp}
|
|
||||||
COMMAND "${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
|
||||||
DEPENDS
|
|
||||||
"${CMAKE_CURRENT_LIST_DIR}/generate-swig.sh"
|
|
||||||
${core_includes}
|
|
||||||
${core_headers}
|
|
||||||
${core_sources}
|
|
||||||
${core_headers_client}
|
|
||||||
${core_sources_client}
|
|
||||||
${core_swig}
|
|
||||||
${core_swig_subfiles}
|
|
||||||
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
|
|
||||||
COMMENT "Generating sources...")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_SHARED_LIBS_ALLOWED_ON_TARGET)
|
|
||||||
add_library(OsmAndJNI SHARED
|
|
||||||
${OsmAndJNI_generated_cpp}
|
|
||||||
)
|
|
||||||
target_compile_definitions(OsmAndJNI
|
|
||||||
PRIVATE
|
|
||||||
-DOSMAND_JNI_EXPORTS
|
|
||||||
-DOSMAND_SWIG
|
|
||||||
)
|
|
||||||
target_include_directories(OsmAndJNI
|
|
||||||
PRIVATE
|
|
||||||
${JNI_INCLUDE_DIRS}
|
|
||||||
${JAVA_INCLUDE_PATH}
|
|
||||||
${target_specific_private_includes}
|
|
||||||
)
|
|
||||||
|
|
||||||
if(CMAKE_STATIC_LIBS_ALLOWED_ON_TARGET)
|
|
||||||
add_dependencies(OsmAndJNI
|
|
||||||
OsmAndCore_static
|
|
||||||
OsmAndCoreUtils_static
|
|
||||||
)
|
|
||||||
target_link_libraries(OsmAndJNI
|
|
||||||
LINK_PUBLIC
|
|
||||||
OsmAndCore_static
|
|
||||||
OsmAndCoreUtils_static
|
|
||||||
${target_specific_public_libraries}
|
|
||||||
)
|
|
||||||
else()
|
|
||||||
add_dependencies(OsmAndJNI
|
|
||||||
OsmAndCore_shared
|
|
||||||
OsmAndCoreUtils_shared
|
|
||||||
)
|
|
||||||
target_link_libraries(OsmAndJNI
|
|
||||||
LINK_PUBLIC
|
|
||||||
OsmAndCore_shared
|
|
||||||
OsmAndCoreUtils_shared
|
|
||||||
${target_specific_public_libraries}
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
|
@ -1,11 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
SRCLOC="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
rm -rf "$SRCLOC/src/net/osmand/core/jni"
|
|
||||||
mkdir -p "$SRCLOC/src/net/osmand/core/jni"
|
|
||||||
|
|
||||||
rm -rf "$SRCLOC/c-src"
|
|
||||||
mkdir -p "$SRCLOC/c-src"
|
|
||||||
|
|
||||||
swig -java -package net.osmand.core.jni -outdir "$SRCLOC/src/net/osmand/core/jni" -o "$SRCLOC/c-src/swig.cpp" -I"$SRCLOC/../../core/include" -c++ -v "$SRCLOC/../../core/core.swig"
|
|
|
@ -1,3 +0,0 @@
|
||||||
# OsmAnd JNI
|
|
||||||
add_subdirectory("${OSMAND_ROOT}/android/OsmAnd-java" "android/OsmAnd-java")
|
|
||||||
add_dependencies(OsmAndJNI OsmAndCore)
|
|
|
@ -2,17 +2,19 @@ LOCAL_PATH := $(call my-dir)
|
||||||
ROOT_PATH := $(LOCAL_PATH)/../../..
|
ROOT_PATH := $(LOCAL_PATH)/../../..
|
||||||
$(info OsmAnd root: $(ROOT_PATH))
|
$(info OsmAnd root: $(ROOT_PATH))
|
||||||
|
|
||||||
|
# LEGACY {
|
||||||
ifdef BUILD_ONLY_OLD_LIB
|
ifdef BUILD_ONLY_OLD_LIB
|
||||||
OSMAND_MAKEFILES := \
|
OSMAND_MAKEFILES := \
|
||||||
$(all-subdir-makefiles) \
|
$(all-subdir-makefiles) \
|
||||||
$(call all-makefiles-under,$(ROOT_PATH)/core/targets/android)
|
$(call all-makefiles-under,$(ROOT_PATH)/core/targets/android)
|
||||||
else
|
else
|
||||||
|
# } LEGACY
|
||||||
OSMAND_MAKEFILES := \
|
OSMAND_MAKEFILES := \
|
||||||
$(call all-makefiles-under,$(ROOT_PATH)/core/externals) \
|
|
||||||
$(ROOT_PATH)/core/Android.mk \
|
|
||||||
$(all-subdir-makefiles) \
|
$(all-subdir-makefiles) \
|
||||||
$(ROOT_PATH)/android/OsmAnd-java/Android.mk
|
$(call all-makefiles-under,$(ROOT_PATH)/core/wrappers/android)
|
||||||
|
# LEGACY {
|
||||||
endif
|
endif
|
||||||
|
# } LEGACY
|
||||||
$(info OsmAnd makefiles: $(OSMAND_MAKEFILES))
|
$(info OsmAnd makefiles: $(OSMAND_MAKEFILES))
|
||||||
|
|
||||||
# Protect from previous builds
|
# Protect from previous builds
|
||||||
|
|
|
@ -7,8 +7,6 @@ else
|
||||||
NDK_TOOLCHAIN_VERSION := 4.7
|
NDK_TOOLCHAIN_VERSION := 4.7
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
APP_ABI :=
|
APP_ABI :=
|
||||||
ifneq ($(filter x86,$(OSMAND_ARCHITECTURES_SET)),)
|
ifneq ($(filter x86,$(OSMAND_ARCHITECTURES_SET)),)
|
||||||
APP_ABI += x86
|
APP_ABI += x86
|
||||||
|
|
Loading…
Reference in a new issue