mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-23 18:49:08 +08:00
Rename cppan/cmake targets.
This commit is contained in:
parent
e85a7e2529
commit
40dc28026b
@ -207,30 +207,30 @@ set(tesseract_src ${tesseract_src}
|
||||
api/pdfrenderer.cpp
|
||||
)
|
||||
|
||||
add_library (tesseract ${LIBRARY_TYPE} ${tesseract_src} ${tesseract_hdr})
|
||||
add_library (libtesseract ${LIBRARY_TYPE} ${tesseract_src} ${tesseract_hdr})
|
||||
if (NOT STATIC)
|
||||
target_compile_definitions (tesseract
|
||||
target_compile_definitions (libtesseract
|
||||
PRIVATE -DTESS_EXPORTS
|
||||
INTERFACE -DTESS_IMPORTS
|
||||
)
|
||||
set_target_properties (tesseract PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS True)
|
||||
set_target_properties (libtesseract PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS True)
|
||||
endif()
|
||||
target_link_libraries (tesseract ${LIB_Ws2_32} ${LIB_pthread})
|
||||
set_target_properties (tesseract PROPERTIES VERSION ${VERSION_MAJOR}.${VERSION_MINOR_0}.${VERSION_MINOR_1})
|
||||
set_target_properties (tesseract PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR_0}.${VERSION_MINOR_1})
|
||||
target_link_libraries (libtesseract ${LIB_Ws2_32} ${LIB_pthread})
|
||||
set_target_properties (libtesseract PROPERTIES VERSION ${VERSION_MAJOR}.${VERSION_MINOR_0}.${VERSION_MINOR_1})
|
||||
set_target_properties (libtesseract PROPERTIES SOVERSION ${VERSION_MAJOR}.${VERSION_MINOR_0}.${VERSION_MINOR_1})
|
||||
if (WIN32)
|
||||
set_target_properties (tesseract PROPERTIES OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR})
|
||||
set_target_properties (tesseract PROPERTIES DEBUG_OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR}d)
|
||||
set_target_properties (libtesseract PROPERTIES OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR})
|
||||
set_target_properties (libtesseract PROPERTIES DEBUG_OUTPUT_NAME tesseract${VERSION_MAJOR}${VERSION_MINOR}d)
|
||||
endif()
|
||||
|
||||
if (NOT CPPAN_BUILD)
|
||||
target_link_libraries (tesseract ${Leptonica_LIBRARIES})
|
||||
export(TARGETS tesseract FILE ${CMAKE_BINARY_DIR}/TesseractTargets.cmake)
|
||||
target_link_libraries (libtesseract ${Leptonica_LIBRARIES})
|
||||
export(TARGETS libtesseract FILE ${CMAKE_BINARY_DIR}/TesseractTargets.cmake)
|
||||
else()
|
||||
target_link_libraries (tesseract pvt.cppan.demo.danbloomberg.leptonica)
|
||||
add_dependencies (tesseract cppan)
|
||||
target_link_libraries (libtesseract pvt.cppan.demo.danbloomberg.leptonica)
|
||||
add_dependencies (libtesseract cppan)
|
||||
file(WRITE ${CMAKE_BINARY_DIR}/TesseractTargets.cmake "include(${CMAKE_BINARY_DIR}/cppan.cmake)\n")
|
||||
export(TARGETS tesseract APPEND FILE ${CMAKE_BINARY_DIR}/TesseractTargets.cmake)
|
||||
export(TARGETS libtesseract APPEND FILE ${CMAKE_BINARY_DIR}/TesseractTargets.cmake)
|
||||
endif()
|
||||
|
||||
########################################
|
||||
@ -242,9 +242,8 @@ set(tesseractmain_src
|
||||
vs2010/tesseract/resource.h
|
||||
vs2010/tesseract/tesseract.rc
|
||||
)
|
||||
add_executable (tesseractmain ${tesseractmain_src})
|
||||
target_link_libraries (tesseractmain tesseract)
|
||||
set_target_properties (tesseractmain PROPERTIES OUTPUT_NAME tesseract)
|
||||
add_executable (tesseract ${tesseractmain_src})
|
||||
target_link_libraries (tesseract libtesseract)
|
||||
|
||||
########################################
|
||||
|
||||
|
17
cppan.yml
17
cppan.yml
@ -17,7 +17,7 @@ common_settings:
|
||||
c++: 11
|
||||
|
||||
projects:
|
||||
tesseract:
|
||||
libtesseract:
|
||||
type: lib
|
||||
export_all_symbols: true
|
||||
files:
|
||||
@ -136,17 +136,17 @@ projects:
|
||||
dependencies:
|
||||
pvt.cppan.demo.danbloomberg.leptonica: 1.74
|
||||
|
||||
tesseractmain:
|
||||
tesseract:
|
||||
files: api/tesseractmain.cpp
|
||||
dependencies:
|
||||
- tesseract
|
||||
- libtesseract
|
||||
|
||||
tessopt:
|
||||
type: lib
|
||||
static_only: true
|
||||
files: training/tessopt.*
|
||||
include_directories: training
|
||||
dependencies: tesseract
|
||||
dependencies: libtesseract
|
||||
|
||||
common_training:
|
||||
type: lib
|
||||
@ -162,8 +162,7 @@ projects:
|
||||
|
||||
ambiguous_words:
|
||||
files: training/ambiguous_words.cpp
|
||||
dependencies:
|
||||
- tesseract
|
||||
dependencies: libtesseract
|
||||
|
||||
classifier_tester:
|
||||
files: training/classifier_tester.cpp
|
||||
@ -171,7 +170,7 @@ projects:
|
||||
|
||||
combine_tessdata:
|
||||
files: training/combine_tessdata.cpp
|
||||
dependencies: tesseract
|
||||
dependencies: libtesseract
|
||||
|
||||
cntraining:
|
||||
files: training/cntraining.cpp
|
||||
@ -179,7 +178,7 @@ projects:
|
||||
|
||||
dawg2wordlist:
|
||||
files: training/dawg2wordlist.cpp
|
||||
dependencies: tesseract
|
||||
dependencies: libtesseract
|
||||
|
||||
mftraining:
|
||||
files:
|
||||
@ -197,7 +196,7 @@ projects:
|
||||
|
||||
wordlist2dawg:
|
||||
files: training/wordlist2dawg.cpp
|
||||
dependencies: tesseract
|
||||
dependencies: libtesseract
|
||||
|
||||
unicharset_training:
|
||||
type: lib
|
||||
|
@ -82,7 +82,7 @@ set(common_training_hdr
|
||||
commontraining.h
|
||||
)
|
||||
add_library (common_training ${common_training_src} ${common_training_hdr})
|
||||
target_link_libraries (common_training tesseract tessopt)
|
||||
target_link_libraries (common_training libtesseract tessopt)
|
||||
project_group (common_training "Training Tools")
|
||||
|
||||
|
||||
@ -91,7 +91,7 @@ project_group (common_training "Training Tools")
|
||||
########################################
|
||||
|
||||
add_executable (ambiguous_words ambiguous_words.cpp)
|
||||
target_link_libraries (ambiguous_words tesseract)
|
||||
target_link_libraries (ambiguous_words libtesseract)
|
||||
project_group (ambiguous_words "Training Tools")
|
||||
|
||||
|
||||
@ -109,7 +109,7 @@ project_group (classifier_tester "Training Tools")
|
||||
########################################
|
||||
|
||||
add_executable (combine_tessdata combine_tessdata.cpp)
|
||||
target_link_libraries (combine_tessdata tesseract)
|
||||
target_link_libraries (combine_tessdata libtesseract)
|
||||
project_group (combine_tessdata "Training Tools")
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ project_group (cntraining "Training Tools")
|
||||
########################################
|
||||
|
||||
add_executable (dawg2wordlist dawg2wordlist.cpp)
|
||||
target_link_libraries (dawg2wordlist tesseract)
|
||||
target_link_libraries (dawg2wordlist libtesseract)
|
||||
project_group (dawg2wordlist "Training Tools")
|
||||
|
||||
|
||||
@ -154,7 +154,7 @@ project_group (shapeclustering "Training Tools")
|
||||
########################################
|
||||
|
||||
add_executable (unicharset_extractor unicharset_extractor.cpp)
|
||||
target_link_libraries (unicharset_extractor tesseract tessopt)
|
||||
target_link_libraries (unicharset_extractor libtesseract tessopt)
|
||||
project_group (unicharset_extractor "Training Tools")
|
||||
|
||||
|
||||
@ -163,7 +163,7 @@ project_group (unicharset_extractor "Training Tools")
|
||||
########################################
|
||||
|
||||
add_executable (wordlist2dawg wordlist2dawg.cpp)
|
||||
target_link_libraries (wordlist2dawg tesseract)
|
||||
target_link_libraries (wordlist2dawg libtesseract)
|
||||
project_group (wordlist2dawg "Training Tools")
|
||||
|
||||
|
||||
@ -235,7 +235,7 @@ endif()
|
||||
add_executable (text2image ${text2image_src})
|
||||
target_include_directories (text2image BEFORE PRIVATE ${Cairo_INCLUDE_DIRS} ${Pango_INCLUDE_DIRS})
|
||||
target_compile_definitions (text2image PRIVATE -DPANGO_ENABLE_ENGINE)
|
||||
target_link_libraries (text2image tesseract common_training
|
||||
target_link_libraries (text2image libtesseract common_training
|
||||
${ICU_LIBRARIES}
|
||||
${Pango_LIBRARIES}
|
||||
${Cairo_LIBRARIES}
|
||||
|
Loading…
Reference in New Issue
Block a user