mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 01:12:47 +08:00
Enable building utilities on windows.
This commit is contained in:
@@ -47,6 +47,10 @@ 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)
|
||||
@@ -93,14 +97,14 @@ ENDIF()
|
||||
set(CMAKE_CSS_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall ")
|
||||
ADD_EXECUTABLE( alpr main.cpp )
|
||||
|
||||
if (WITH_ALPR_STATICALLY_LINKED)
|
||||
SET(ALPR_LINK_LIBRARY openalpr-static)
|
||||
if (WIN32)
|
||||
SET(OPENALPR_LIB openalpr-static)
|
||||
ELSE()
|
||||
SET(ALPR_LINK_LIBRARY openalpr)
|
||||
SET(OPENALPR_LIB openalpr)
|
||||
ENDIF()
|
||||
|
||||
TARGET_LINK_LIBRARIES(alpr
|
||||
${ALPR_LINK_LIBRARY}
|
||||
${OPENALPR_LIB}
|
||||
support
|
||||
video
|
||||
${OpenCV_LIBS}
|
||||
@@ -123,8 +127,10 @@ 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)
|
||||
|
@@ -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,7 +9,7 @@ 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}
|
||||
@@ -22,7 +22,7 @@ ADD_EXECUTABLE(openalpr-utils-benchmark
|
||||
benchmarks/endtoendtest.cpp
|
||||
)
|
||||
TARGET_LINK_LIBRARIES(openalpr-utils-benchmark
|
||||
openalpr
|
||||
${OPENALPR_LIB}
|
||||
support
|
||||
pthread
|
||||
${OpenCV_LIBS}
|
||||
@@ -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}
|
||||
|
Reference in New Issue
Block a user