|
|
|
@ -14,8 +14,10 @@ else()
|
|
|
|
|
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} doesn’t support C++11. Please upgrade or use a different C++ compiler.")
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# opencv package required
|
|
|
|
|
find_package(OpenCV REQUIRED)
|
|
|
|
|
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "/usr/local/opt/opencv3")
|
|
|
|
|
# opencv3 package required
|
|
|
|
|
find_package(OpenCV 3.0.0 REQUIRED)
|
|
|
|
|
include_directories(${OpenCV_INCLUDE_DIRS})
|
|
|
|
|
|
|
|
|
|
# easypr library
|
|
|
|
|
include_directories(include)
|
|
|
|
@ -41,6 +43,8 @@ set(SOURCE_FILES
|
|
|
|
|
add_library(easypr STATIC ${SOURCE_FILES})
|
|
|
|
|
|
|
|
|
|
# test cases
|
|
|
|
|
add_executable(easypr_test test/main.cpp)
|
|
|
|
|
add_executable(demo test/main.cpp)
|
|
|
|
|
|
|
|
|
|
target_link_libraries(easypr_test ${OpenCV_LIBS} easypr)
|
|
|
|
|
# link
|
|
|
|
|
target_link_libraries(demo ${OpenCV_LIBS} easypr ${OpenCV_LIBS})
|
|
|
|
|
set_target_properties(demo PROPERTIES RUNTIME_OUTPUT_DIRECTORY ../)
|