add cpp and android
This commit is contained in:
@@ -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})
|
||||
Reference in New Issue
Block a user