diff --git a/CMakeLists.txt b/CMakeLists.txt index 0fddb6e1178ebab43e62ca50b6953fdecfad1c7b..233fea51fc65b872e6b914eaf2f790cb2881a470 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -270,4 +270,88 @@ if (BUILD_TRAINING_TOOLS) add_subdirectory(training) endif() +get_target_property(tesseract_NAME libtesseract NAME) +get_target_property(tesseract_VERSION libtesseract VERSION) +get_target_property(tesseract_OUTPUT_NAME libtesseract OUTPUT_NAME) +configure_file(tesseract.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/tesseract.pc @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/tesseract.pc DESTINATION lib/pkgconfig) +install(TARGETS tesseract RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) +install(TARGETS libtesseract EXPORT TesseractTargets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) +install(EXPORT TesseractTargets DESTINATION cmake) +install(FILES + ${CMAKE_BINARY_DIR}/TesseractConfig.cmake + ${CMAKE_BINARY_DIR}/TesseractConfig-version.cmake + DESTINATION cmake) + +install(FILES + # from api/makefile.am + api/apitypes.h + api/baseapi.h + api/capi.h + api/renderer.h + + #from arch/makefile.am + arch/dotproductavx.h + arch/dotproductsse.h + arch/simddetect.h + + #from ccmain/makefile.am + ccmain/thresholder.h + ccmain/ltrresultiterator.h + ccmain/pageiterator.h + ccmain/resultiterator.h + ccmain/osdetect.h + + #from ccstruct/makefile.am + ccstruct/publictypes.h + + #from ccutil/makefile.am + ccutil/basedir.h + ccutil/errcode.h + ccutil/fileerr.h + ccutil/genericvector.h + ccutil/helpers.h + ccutil/host.h + ccutil/memry.h + ccutil/ndminx.h + ccutil/params.h + ccutil/ocrclass.h + ccutil/platform.h + ccutil/serialis.h + ccutil/strngs.h + ccutil/tesscallback.h + ccutil/unichar.h + ccutil/unicharcompress.h + ccutil/unicharmap.h + ccutil/unicharset.h + + #from lstm/makefile.am + lstm/convolve.h + lstm/ctc.h + lstm/fullyconnected.h + lstm/functions.h + lstm/input.h + lstm/lstm.h + lstm/lstmrecognizer.h + lstm/lstmtrainer.h + lstm/maxpool.h + lstm/networkbuilder.h + lstm/network.h + lstm/networkio.h + lstm/networkscratch.h + lstm/parallel.h + lstm/plumbing.h + lstm/recodebeam.h + lstm/reconfig.h + lstm/reversed.h + lstm/series.h + lstm/static_shape.h + lstm/stridemap.h + lstm/tfnetwork.h + lstm/weightmatrix.h + + #${CMAKE_BINARY_DIR}/src/endianness.h + DESTINATION include/tesseract) + + ############################################################################### diff --git a/tesseract.pc.cmake b/tesseract.pc.cmake new file mode 100644 index 0000000000000000000000000000000000000000..f9f64f6c9d9dc1e13414e8cfc4b19da7b0496bb2 --- /dev/null +++ b/tesseract.pc.cmake @@ -0,0 +1,12 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix}/bin +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: @tesseract_NAME@ +Description: An OCR Engine that was developed at HP Labs between 1985 and 1995... and now at Google. +URL: https://github.com/tesseract-ocr/tesseract +Version: @tesseract_VERSION@ +Libs: -L${libdir} -l@tesseract_OUTPUT_NAME@ +Libs.private: +Cflags: -I${includedir} -I${includedir}/tesseract