diff --git a/.gitignore b/.gitignore index ec0ecc0..b94a828 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *~ build/ +windows/ scratch/ out/ debian_repo diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f1104f6..9dd1b13 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,6 +27,30 @@ IF ( NOT DEFINED WITH_DAEMON ) SET(WITH_DAEMON ON) ENDIF() +if ( NOT DEFINED WITH_GPU_DETECTOR ) + SET(WITH_GPU_DETECTOR OFF) +ENDIF() + +if ( NOT DEFINED WITH_TESTS ) + SET(WITH_TESTS ON) +ENDIF() + +if ( NOT DEFINED WITH_BINDING_JAVA ) + SET(WITH_BINDING_JAVA ON) +ENDIF() + +if ( NOT DEFINED WITH_BINDING_PYTHON ) + SET(WITH_BINDING_PYTHON ON) +ENDIF() + +if ( NOT DEFINED WITH_ALPR_STATICALLY_LINKED) + SET(WITH_ALPR_STATICALLY_LINKED OFF) +ENDIF() + +if ( NOT DEFINED WITH_UTILITIES ) + SET(WITH_UTILITIES ON) +ENDIF() + IF (WIN32 AND WITH_DAEMON) MESSAGE(WARNING "Skipping alprd daemon installation, as it is not supported in Windows.") SET(WITH_DAEMON OFF) @@ -73,8 +97,14 @@ ENDIF() set(CMAKE_CSS_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall ") ADD_EXECUTABLE( alpr main.cpp ) +if (WIN32) + SET(OPENALPR_LIB openalpr-static) +ELSE() + SET(OPENALPR_LIB openalpr) +ENDIF() + TARGET_LINK_LIBRARIES(alpr - openalpr + ${OPENALPR_LIB} support video ${OpenCV_LIBS} @@ -97,17 +127,26 @@ IF (WITH_DAEMON) ${Extra_LIBS} ) - # Don't include misc utilities for Windows - add_subdirectory(misc_utilities) ENDIF() - + +if(WITH_UTILITIES) +add_subdirectory(misc_utilities) +ENDIF() + +if (WITH_TESTS) add_subdirectory(tests) +ENDIF() add_subdirectory(openalpr) add_subdirectory(video) -add_subdirectory(bindings/python) +if (WITH_BINDING_JAVA) add_subdirectory(bindings/java) +ENDIF() + +if (WITH_BINDING_PYTHON) +add_subdirectory(bindings/python) +ENDIF() install (TARGETS alpr DESTINATION ${CMAKE_INSTALL_PREFIX}/bin) install (FILES ${CMAKE_SOURCE_DIR}/../doc/man/alpr.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1 COMPONENT doc) diff --git a/src/bindings/csharp/openalpr-net/AssemblyInfo.cpp b/src/bindings/csharp/openalpr-net/AssemblyInfo.cpp index 61560b3..f600e22 100644 --- a/src/bindings/csharp/openalpr-net/AssemblyInfo.cpp +++ b/src/bindings/csharp/openalpr-net/AssemblyInfo.cpp @@ -31,7 +31,9 @@ using namespace System::Security::Permissions; // You can specify all the value or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly:AssemblyVersionAttribute("1.0.*")]; +[assembly: AssemblyVersionAttribute("2.0.1")] +[assembly: AssemblyFileVersionAttribute("2.0.1")] +[assembly: AssemblyInformationalVersionAttribute("2.0.1")] [assembly:ComVisible(false)]; diff --git a/src/misc_utilities/CMakeLists.txt b/src/misc_utilities/CMakeLists.txt index 9d48572..969cb9d 100644 --- a/src/misc_utilities/CMakeLists.txt +++ b/src/misc_utilities/CMakeLists.txt @@ -1,7 +1,7 @@ ADD_EXECUTABLE( openalpr-utils-sortstate sortstate.cpp ) TARGET_LINK_LIBRARIES(openalpr-utils-sortstate - openalpr + ${OPENALPR_LIB} support ${OpenCV_LIBS} ${Tesseract_LIBRARIES} @@ -9,26 +9,26 @@ TARGET_LINK_LIBRARIES(openalpr-utils-sortstate ADD_EXECUTABLE( openalpr-utils-classifychars classifychars.cpp ) TARGET_LINK_LIBRARIES(openalpr-utils-classifychars - openalpr + ${OPENALPR_LIB} support ${OpenCV_LIBS} ${Tesseract_LIBRARIES} ) - +if (NOT DEFINED WIN32) ADD_EXECUTABLE(openalpr-utils-benchmark benchmarks/benchmark.cpp benchmarks/benchmark_utils.cpp benchmarks/endtoendtest.cpp ) TARGET_LINK_LIBRARIES(openalpr-utils-benchmark - openalpr + ${OPENALPR_LIB} support pthread ${OpenCV_LIBS} ${Tesseract_LIBRARIES} ) - +ENDIF() ADD_EXECUTABLE( openalpr-utils-prepcharsfortraining prepcharsfortraining.cpp ) TARGET_LINK_LIBRARIES(openalpr-utils-prepcharsfortraining @@ -38,21 +38,21 @@ TARGET_LINK_LIBRARIES(openalpr-utils-prepcharsfortraining ADD_EXECUTABLE( openalpr-utils-binarizefontsheet binarizefontsheet.cpp ) TARGET_LINK_LIBRARIES(openalpr-utils-binarizefontsheet - openalpr + ${OPENALPR_LIB} support ${OpenCV_LIBS} ) ADD_EXECUTABLE( openalpr-utils-tagplates tagplates.cpp ) TARGET_LINK_LIBRARIES(openalpr-utils-tagplates - openalpr + ${OPENALPR_LIB} support ${OpenCV_LIBS} ) ADD_EXECUTABLE( openalpr-utils-calibrate calibrate.cpp ) TARGET_LINK_LIBRARIES(openalpr-utils-calibrate - openalpr + ${OPENALPR_LIB} support ${OpenCV_LIBS} ${Tesseract_LIBRARIES} @@ -64,7 +64,11 @@ install (TARGETS openalpr-utils-calibrate DESTINATION bin) install (TARGETS openalpr-utils-sortstate DESTINATION bin) install (TARGETS openalpr-utils-classifychars DESTINATION bin) + +if (NOT DEFINED WIN32) install (TARGETS openalpr-utils-benchmark DESTINATION bin) +ENDIF() + install (TARGETS openalpr-utils-prepcharsfortraining DESTINATION bin) install (TARGETS openalpr-utils-tagplates DESTINATION bin) install (TARGETS openalpr-utils-calibrate DESTINATION bin) diff --git a/src/openalpr/CMakeLists.txt b/src/openalpr/CMakeLists.txt index bfb3b22..6ec14b9 100644 --- a/src/openalpr/CMakeLists.txt +++ b/src/openalpr/CMakeLists.txt @@ -61,7 +61,9 @@ install (TARGETS openalpr-static DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) install (TARGETS openalpr DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) # Compile GPU detector -#add_definitions(-DCOMPILE_GPU=1) +IF ( WITH_GPU_DETECTOR ) +add_definitions(-DCOMPILE_GPU=1) +ENDIF() # Add definition for default config file add_definitions(-DDEFAULT_CONFIG_FILE="${CMAKE_INSTALL_SYSCONFDIR}/openalpr/openalpr.conf")