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)
|
SET(WITH_ALPR_STATICALLY_LINKED OFF)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
if ( NOT DEFINED WITH_UTILITIES )
|
||||||
|
SET(WITH_UTILITIES ON)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
IF (WIN32 AND WITH_DAEMON)
|
IF (WIN32 AND WITH_DAEMON)
|
||||||
MESSAGE(WARNING "Skipping alprd daemon installation, as it is not supported in Windows.")
|
MESSAGE(WARNING "Skipping alprd daemon installation, as it is not supported in Windows.")
|
||||||
SET(WITH_DAEMON OFF)
|
SET(WITH_DAEMON OFF)
|
||||||
@@ -93,14 +97,14 @@ ENDIF()
|
|||||||
set(CMAKE_CSS_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall ")
|
set(CMAKE_CSS_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall ")
|
||||||
ADD_EXECUTABLE( alpr main.cpp )
|
ADD_EXECUTABLE( alpr main.cpp )
|
||||||
|
|
||||||
if (WITH_ALPR_STATICALLY_LINKED)
|
if (WIN32)
|
||||||
SET(ALPR_LINK_LIBRARY openalpr-static)
|
SET(OPENALPR_LIB openalpr-static)
|
||||||
ELSE()
|
ELSE()
|
||||||
SET(ALPR_LINK_LIBRARY openalpr)
|
SET(OPENALPR_LIB openalpr)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(alpr
|
TARGET_LINK_LIBRARIES(alpr
|
||||||
${ALPR_LINK_LIBRARY}
|
${OPENALPR_LIB}
|
||||||
support
|
support
|
||||||
video
|
video
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
@@ -123,8 +127,10 @@ IF (WITH_DAEMON)
|
|||||||
${Extra_LIBS}
|
${Extra_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Don't include misc utilities for Windows
|
ENDIF()
|
||||||
add_subdirectory(misc_utilities)
|
|
||||||
|
if(WITH_UTILITIES)
|
||||||
|
add_subdirectory(misc_utilities)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
if (WITH_TESTS)
|
if (WITH_TESTS)
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
ADD_EXECUTABLE( openalpr-utils-sortstate sortstate.cpp )
|
ADD_EXECUTABLE( openalpr-utils-sortstate sortstate.cpp )
|
||||||
TARGET_LINK_LIBRARIES(openalpr-utils-sortstate
|
TARGET_LINK_LIBRARIES(openalpr-utils-sortstate
|
||||||
openalpr
|
${OPENALPR_LIB}
|
||||||
support
|
support
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
${Tesseract_LIBRARIES}
|
${Tesseract_LIBRARIES}
|
||||||
@@ -9,7 +9,7 @@ TARGET_LINK_LIBRARIES(openalpr-utils-sortstate
|
|||||||
|
|
||||||
ADD_EXECUTABLE( openalpr-utils-classifychars classifychars.cpp )
|
ADD_EXECUTABLE( openalpr-utils-classifychars classifychars.cpp )
|
||||||
TARGET_LINK_LIBRARIES(openalpr-utils-classifychars
|
TARGET_LINK_LIBRARIES(openalpr-utils-classifychars
|
||||||
openalpr
|
${OPENALPR_LIB}
|
||||||
support
|
support
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
${Tesseract_LIBRARIES}
|
${Tesseract_LIBRARIES}
|
||||||
@@ -22,7 +22,7 @@ ADD_EXECUTABLE(openalpr-utils-benchmark
|
|||||||
benchmarks/endtoendtest.cpp
|
benchmarks/endtoendtest.cpp
|
||||||
)
|
)
|
||||||
TARGET_LINK_LIBRARIES(openalpr-utils-benchmark
|
TARGET_LINK_LIBRARIES(openalpr-utils-benchmark
|
||||||
openalpr
|
${OPENALPR_LIB}
|
||||||
support
|
support
|
||||||
pthread
|
pthread
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
@@ -38,21 +38,21 @@ TARGET_LINK_LIBRARIES(openalpr-utils-prepcharsfortraining
|
|||||||
|
|
||||||
ADD_EXECUTABLE( openalpr-utils-binarizefontsheet binarizefontsheet.cpp )
|
ADD_EXECUTABLE( openalpr-utils-binarizefontsheet binarizefontsheet.cpp )
|
||||||
TARGET_LINK_LIBRARIES(openalpr-utils-binarizefontsheet
|
TARGET_LINK_LIBRARIES(openalpr-utils-binarizefontsheet
|
||||||
openalpr
|
${OPENALPR_LIB}
|
||||||
support
|
support
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_EXECUTABLE( openalpr-utils-tagplates tagplates.cpp )
|
ADD_EXECUTABLE( openalpr-utils-tagplates tagplates.cpp )
|
||||||
TARGET_LINK_LIBRARIES(openalpr-utils-tagplates
|
TARGET_LINK_LIBRARIES(openalpr-utils-tagplates
|
||||||
openalpr
|
${OPENALPR_LIB}
|
||||||
support
|
support
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_EXECUTABLE( openalpr-utils-calibrate calibrate.cpp )
|
ADD_EXECUTABLE( openalpr-utils-calibrate calibrate.cpp )
|
||||||
TARGET_LINK_LIBRARIES(openalpr-utils-calibrate
|
TARGET_LINK_LIBRARIES(openalpr-utils-calibrate
|
||||||
openalpr
|
${OPENALPR_LIB}
|
||||||
support
|
support
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
${Tesseract_LIBRARIES}
|
${Tesseract_LIBRARIES}
|
||||||
|
Reference in New Issue
Block a user