Enable building utilities on windows.

This commit is contained in:
Peter Rekdal Sunde
2015-07-06 21:58:17 +02:00
parent 672d2172f9
commit bac1ce2c5a
2 changed files with 18 additions and 12 deletions

View File

@@ -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)

View File

@@ -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}