add cpp and android

This commit is contained in:
jackyu
2017-10-28 22:53:09 +08:00
parent 58a4b33392
commit c524d33cfb
386 changed files with 44466 additions and 3 deletions
+37
View File
@@ -0,0 +1,37 @@
cmake_minimum_required(VERSION 3.6)
project(SwiftPR)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_library( lib_opencv SHARED IMPORTED )
find_library( # Sets the name of the path variable.
log-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
log )
include_directories(/Users/yujinke/Downloads/OpenCV-android-sdk-3.3/sdk/native/jni/include)
include_directories(include)
set_target_properties(lib_opencv PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/../jniLibs/${ANDROID_ABI}/libopencv_java3.so)
set(SRC_DETECTION src/PlateDetection.cpp src/util.h include/PlateDetection.h)
set(SRC_FINEMAPPING src/FineMapping.cpp )
set(SRC_FASTDESKEW src/FastDeskew.cpp )
set(SRC_SEGMENTATION src/PlateSegmentation.cpp )
set(SRC_RECOGNIZE src/Recognizer.cpp src/CNNRecognizer.cpp)
set(SRC_PIPLINE src/Pipeline.cpp)
add_library(hyperlpr SHARED ${SRC_DETECTION} ${SRC_FINEMAPPING} ${SRC_FASTDESKEW} ${SRC_SEGMENTATION} ${SRC_RECOGNIZE} ${SRC_PIPLINE} javaWarpper.cpp)
target_link_libraries(hyperlpr lib_opencv ${log-lib})