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)
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,7 +127,9 @@ IF (WITH_DAEMON)
${Extra_LIBS}
)
# Don't include misc utilities for Windows
ENDIF()
if(WITH_UTILITIES)
add_subdirectory(misc_utilities)
ENDIF()

View File

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