mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 01:12:47 +08:00
Updated CMakeLists.txt for Windows builds
This commit is contained in:
@@ -18,9 +18,23 @@ IF (WIN32)
|
|||||||
add_definitions( -DNOMINMAX)
|
add_definitions( -DNOMINMAX)
|
||||||
|
|
||||||
link_directories( ${Tesseract_DIR}/vs2008/LIB_Release/ )
|
link_directories( ${Tesseract_DIR}/vs2008/LIB_Release/ )
|
||||||
|
|
||||||
|
# Extra linker dependencies for Windows
|
||||||
|
SET(Tesseract_LIBS
|
||||||
|
libtesseract302-static
|
||||||
|
liblept168
|
||||||
|
liblept168-static-mtdll
|
||||||
|
libpng143-static-mtdll
|
||||||
|
libjpeg8c-static-mtdll
|
||||||
|
giflib416-static-mtdll
|
||||||
|
libtiff394-static-mtdll
|
||||||
|
zlib125-static-mtdll
|
||||||
|
ws2_32.lib)
|
||||||
ELSE()
|
ELSE()
|
||||||
|
|
||||||
link_directories( ${Tesseract_DIR}/api/.libs/ )
|
link_directories( ${Tesseract_DIR}/api/.libs/ )
|
||||||
|
|
||||||
|
SET(Tesseract_LIBS tesseract)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
|
||||||
@@ -38,32 +52,13 @@ set(CMAKE_CSS_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall ")
|
|||||||
ADD_EXECUTABLE( alpr main.cpp )
|
ADD_EXECUTABLE( alpr main.cpp )
|
||||||
|
|
||||||
|
|
||||||
IF (WIN32)
|
|
||||||
# Extra linker dependencies for Windows
|
|
||||||
TARGET_LINK_LIBRARIES(alpr
|
|
||||||
openalpr
|
|
||||||
support
|
|
||||||
${OpenCV_LIBS}
|
|
||||||
libtesseract302-static
|
|
||||||
liblept168
|
|
||||||
liblept168-static-mtdll
|
|
||||||
libpng143-static-mtdll
|
|
||||||
libjpeg8c-static-mtdll
|
|
||||||
giflib416-static-mtdll
|
|
||||||
libtiff394-static-mtdll
|
|
||||||
zlib125-static-mtdll
|
|
||||||
ws2_32.lib
|
|
||||||
)
|
|
||||||
|
|
||||||
ELSE()
|
TARGET_LINK_LIBRARIES(alpr
|
||||||
|
openalpr-static
|
||||||
TARGET_LINK_LIBRARIES(alpr
|
support
|
||||||
openalpr
|
${OpenCV_LIBS}
|
||||||
support
|
${Tesseract_LIBS}
|
||||||
${OpenCV_LIBS}
|
)
|
||||||
tesseract
|
|
||||||
)
|
|
||||||
ENDIF()
|
|
||||||
|
|
||||||
add_subdirectory(openalpr)
|
add_subdirectory(openalpr)
|
||||||
add_subdirectory(misc_utilities)
|
add_subdirectory(misc_utilities)
|
||||||
|
@@ -5,27 +5,27 @@ target_link_libraries(openalpr)
|
|||||||
|
|
||||||
ADD_EXECUTABLE( sortstate sortstate.cpp )
|
ADD_EXECUTABLE( sortstate sortstate.cpp )
|
||||||
TARGET_LINK_LIBRARIES(sortstate
|
TARGET_LINK_LIBRARIES(sortstate
|
||||||
openalpr
|
openalpr-static
|
||||||
support
|
support
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
tesseract
|
${Tesseract_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
ADD_EXECUTABLE( classifychars classifychars.cpp )
|
ADD_EXECUTABLE( classifychars classifychars.cpp )
|
||||||
TARGET_LINK_LIBRARIES(classifychars
|
TARGET_LINK_LIBRARIES(classifychars
|
||||||
openalpr
|
openalpr-static
|
||||||
support
|
support
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
tesseract
|
${Tesseract_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
ADD_EXECUTABLE( benchmark benchmark.cpp )
|
ADD_EXECUTABLE( benchmark benchmark.cpp )
|
||||||
TARGET_LINK_LIBRARIES(benchmark
|
TARGET_LINK_LIBRARIES(benchmark
|
||||||
openalpr
|
openalpr-static
|
||||||
support
|
support
|
||||||
${OpenCV_LIBS}
|
${OpenCV_LIBS}
|
||||||
tesseract
|
${Tesseract_LIBS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -35,6 +35,11 @@ add_subdirectory(support)
|
|||||||
add_library(openalpr-static STATIC ${lpr_source_files} )
|
add_library(openalpr-static STATIC ${lpr_source_files} )
|
||||||
add_library(openalpr SHARED ${lpr_source_files} )
|
add_library(openalpr SHARED ${lpr_source_files} )
|
||||||
|
|
||||||
|
TARGET_LINK_LIBRARIES(openalpr
|
||||||
|
support
|
||||||
|
${OpenCV_LIBS}
|
||||||
|
${Tesseract_LIBS}
|
||||||
|
)
|
||||||
|
|
||||||
# Add definition for default runtime dir
|
# Add definition for default runtime dir
|
||||||
add_definitions(-DDEFAULT_RUNTIME_DIR="${CMAKE_SOURCE_DIR}/../runtime_data/")
|
add_definitions(-DDEFAULT_RUNTIME_DIR="${CMAKE_SOURCE_DIR}/../runtime_data/")
|
Reference in New Issue
Block a user