Skip to content

Commit

Permalink
Move sources into src dir. Update build scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Apr 25, 2018
1 parent e8fceb5 commit e95ff11
Show file tree
Hide file tree
Showing 518 changed files with 33,889 additions and 33,886 deletions.
240 changes: 120 additions & 120 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ configure_file(${AUTOCONFIG_SRC} ${AUTOCONFIG} @ONLY)
set(INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" "${CMAKE_INSTALL_PREFIX}/include/tesseract")

configure_file(
${CMAKE_SOURCE_DIR}/api/tess_version.h.in
${CMAKE_BINARY_DIR}/api/tess_version.h @ONLY)
${CMAKE_SOURCE_DIR}/src/api/tess_version.h.in
${CMAKE_BINARY_DIR}/src/api/tess_version.h @ONLY)
configure_file(
${CMAKE_SOURCE_DIR}/vs2010/tesseract/tesseract.rc.in
${CMAKE_BINARY_DIR}/vs2010/tesseract/tesseract.rc @ONLY)
${CMAKE_SOURCE_DIR}/src/vs2010/tesseract/tesseract.rc.in
${CMAKE_BINARY_DIR}/src/vs2010/tesseract/tesseract.rc @ONLY)
configure_file(
${CMAKE_SOURCE_DIR}/vs2010/tesseract/libtesseract.rc.in
${CMAKE_BINARY_DIR}/vs2010/tesseract/libtesseract.rc @ONLY)
${CMAKE_SOURCE_DIR}/src/vs2010/tesseract/libtesseract.rc.in
${CMAKE_BINARY_DIR}/src/vs2010/tesseract/libtesseract.rc @ONLY)
configure_file(
${CMAKE_SOURCE_DIR}/cmake/templates/TesseractConfig-version.cmake.in
${CMAKE_BINARY_DIR}/TesseractConfig-version.cmake @ONLY)
Expand All @@ -160,101 +160,101 @@ include_directories(${Leptonica_INCLUDE_DIRS})

include_directories(${CMAKE_BINARY_DIR})

include_directories(api)
include_directories(src/api)
include_directories(${CMAKE_BINARY_DIR}/api)
include_directories(arch)
include_directories(ccmain)
include_directories(ccstruct)
include_directories(ccutil)
include_directories(classify)
include_directories(cutil)
include_directories(dict)
include_directories(lstm)
include_directories(opencl)
include_directories(textord)
include_directories(vs2010/port)
include_directories(viewer)
include_directories(wordrec)
include_directories(src/arch)
include_directories(src/ccmain)
include_directories(src/ccstruct)
include_directories(src/ccutil)
include_directories(src/classify)
include_directories(src/cutil)
include_directories(src/dict)
include_directories(src/lstm)
include_directories(src/opencl)
include_directories(src/textord)
include_directories(src/vs2010/port)
include_directories(src/viewer)
include_directories(src/wordrec)

########################################
# LIBRARY tesseract
########################################

file(GLOB tesseract_src
arch/*.cpp
ccmain/*.cpp
ccstruct/*.cpp
ccutil/*.cpp
classify/*.cpp
cutil/*.cpp
dict/*.cpp
lstm/*.cpp
opencl/*.cpp
textord/*.cpp
viewer/*.cpp
wordrec/*.cpp
src/arch/*.cpp
src/ccmain/*.cpp
src/ccstruct/*.cpp
src/ccutil/*.cpp
src/classify/*.cpp
src/cutil/*.cpp
src/dict/*.cpp
src/lstm/*.cpp
src/opencl/*.cpp
src/textord/*.cpp
src/viewer/*.cpp
src/wordrec/*.cpp
)
file(GLOB tesseract_hdr
api/*.h
arch/*.h
ccmain/*.h
ccstruct/*.h
ccutil/*.h
classify/*.h
cutil/*.h
dict/*.h
lstm/*.h
opencl/*.h
textord/*.h
viewer/*.h
wordrec/*.h
src/api/*.h
src/arch/*.h
src/ccmain/*.h
src/ccstruct/*.h
src/ccutil/*.h
src/classify/*.h
src/cutil/*.h
src/dict/*.h
src/lstm/*.h
src/opencl/*.h
src/textord/*.h
src/viewer/*.h
src/wordrec/*.h
)
if (WIN32)
file(GLOB tesseract_win32_src "vs2010/port/*.cpp")
file(GLOB tesseract_win32_hdr "vs2010/port/*.h")
file(GLOB tesseract_win32_src "src/vs2010/port/*.cpp")
file(GLOB tesseract_win32_hdr "src/vs2010/port/*.h")
set(tesseract_src ${tesseract_src} ${tesseract_win32_src})
set(tesseract_hdr ${tesseract_hdr} ${tesseract_win32_hdr})
endif()

set(tesseract_src ${tesseract_src}
api/baseapi.cpp
api/capi.cpp
api/renderer.cpp
api/pdfrenderer.cpp
src/api/baseapi.cpp
src/api/capi.cpp
src/api/renderer.cpp
src/api/pdfrenderer.cpp
)

if (WIN32)
if (MSVC)
include_directories(vs2010/tesseract)
include_directories(src/vs2010/tesseract)
set(tesseract_hdr
${tesseract_hdr}
${CMAKE_CURRENT_SOURCE_DIR}/vs2010/tesseract/resource.h)
set(tesseract_rsc ${CMAKE_BINARY_DIR}/vs2010/tesseract/libtesseract.rc)
${CMAKE_CURRENT_SOURCE_DIR}/src/vs2010/tesseract/resource.h)
set(tesseract_rsc ${CMAKE_BINARY_DIR}/src/vs2010/tesseract/libtesseract.rc)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/arch/dotproductsse.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductsse.cpp
PROPERTIES COMPILE_DEFINITIONS __SSE4_1__)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/arch/intsimdmatrixsse.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixsse.cpp
PROPERTIES COMPILE_DEFINITIONS __SSE4_1__)
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/arch/dotproductavx.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductavx.cpp
PROPERTIES COMPILE_FLAGS "/arch:AVX")
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/arch/intsimdmatrixavx2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixavx2.cpp
PROPERTIES COMPILE_FLAGS "/arch:AVX2")
endif()
else()
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/arch/dotproductsse.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductsse.cpp
PROPERTIES COMPILE_FLAGS "-msse4.1")
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/arch/intsimdmatrixsse.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixsse.cpp
PROPERTIES COMPILE_FLAGS "-msse4.1")
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/arch/dotproductavx.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductavx.cpp
PROPERTIES COMPILE_FLAGS "-mavx")
set_source_files_properties(
${CMAKE_CURRENT_SOURCE_DIR}/arch/intsimdmatrixavx2.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixavx2.cpp
PROPERTIES COMPILE_FLAGS "-mavx2")
endif()

Expand Down Expand Up @@ -291,7 +291,7 @@ endif()
# EXECUTABLE tesseractmain
########################################

set(tesseractmain_src api/tesseractmain.cpp)
set(tesseractmain_src src/api/tesseractmain.cpp)
if (MSVC)
set(tesseractmain_rsc ${CMAKE_BINARY_DIR}/vs2010/tesseract/tesseract.rc)
endif()
Expand Down Expand Up @@ -326,74 +326,74 @@ install(FILES

install(FILES
# from api/makefile.am
api/apitypes.h
api/baseapi.h
api/capi.h
api/renderer.h
src/api/apitypes.h
src/api/baseapi.h
src/api/capi.h
src/api/renderer.h
${CMAKE_CURRENT_BINARY_DIR}/api/tess_version.h

#from arch/makefile.am
arch/dotproductavx.h
arch/dotproductsse.h
arch/intsimdmatrix.h
arch/intsimdmatrixavx2.h
arch/intsimdmatrixsse.h
arch/simddetect.h
src/arch/dotproductavx.h
src/arch/dotproductsse.h
src/arch/intsimdmatrix.h
src/arch/intsimdmatrixavx2.h
src/arch/intsimdmatrixsse.h
src/arch/simddetect.h

#from ccmain/makefile.am
ccmain/thresholder.h
ccmain/ltrresultiterator.h
ccmain/pageiterator.h
ccmain/resultiterator.h
ccmain/osdetect.h
src/ccmain/thresholder.h
src/ccmain/ltrresultiterator.h
src/ccmain/pageiterator.h
src/ccmain/resultiterator.h
src/ccmain/osdetect.h

#from ccstruct/makefile.am
ccstruct/publictypes.h
src/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
src/ccutil/basedir.h
src/ccutil/errcode.h
src/ccutil/fileerr.h
src/ccutil/genericvector.h
src/ccutil/helpers.h
src/ccutil/host.h
src/ccutil/memry.h
src/ccutil/ndminx.h
src/ccutil/params.h
src/ccutil/ocrclass.h
src/ccutil/platform.h
src/ccutil/serialis.h
src/ccutil/strngs.h
src/ccutil/tesscallback.h
src/ccutil/unichar.h
src/ccutil/unicharcompress.h
src/ccutil/unicharmap.h
src/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
src/lstm/convolve.h
src/lstm/ctc.h
src/lstm/fullyconnected.h
src/lstm/functions.h
src/lstm/input.h
src/lstm/lstm.h
src/lstm/lstmrecognizer.h
src/lstm/lstmtrainer.h
src/lstm/maxpool.h
src/lstm/networkbuilder.h
src/lstm/network.h
src/lstm/networkio.h
src/lstm/networkscratch.h
src/lstm/parallel.h
src/lstm/plumbing.h
src/lstm/recodebeam.h
src/lstm/reconfig.h
src/lstm/reversed.h
src/lstm/series.h
src/lstm/static_shape.h
src/lstm/stridemap.h
src/lstm/tfnetwork.h
src/lstm/weightmatrix.h

#${CMAKE_BINARY_DIR}/src/endianness.h
DESTINATION include/tesseract)
Expand Down
30 changes: 15 additions & 15 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ AC_LANG_COMPILER_REQUIRE
CXXFLAGS=${CXXFLAGS:-""}
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_SRCDIR([api/tesseractmain.cpp])
AC_CONFIG_SRCDIR([src/api/tesseractmain.cpp])
AC_PREFIX_DEFAULT([/usr/local])

# Automake configuration. Do not require README file (we use README.md).
Expand Down Expand Up @@ -476,20 +476,20 @@ fi
# Output files
AC_CONFIG_FILES([Makefile tesseract.pc])
AC_CONFIG_FILES([api/Makefile])
AC_CONFIG_FILES([api/tess_version.h])
AC_CONFIG_FILES([arch/Makefile])
AC_CONFIG_FILES([ccmain/Makefile])
AC_CONFIG_FILES([opencl/Makefile])
AC_CONFIG_FILES([ccstruct/Makefile])
AC_CONFIG_FILES([ccutil/Makefile])
AC_CONFIG_FILES([classify/Makefile])
AC_CONFIG_FILES([cutil/Makefile])
AC_CONFIG_FILES([dict/Makefile])
AC_CONFIG_FILES([lstm/Makefile])
AC_CONFIG_FILES([textord/Makefile])
AC_CONFIG_FILES([viewer/Makefile])
AC_CONFIG_FILES([wordrec/Makefile])
AC_CONFIG_FILES([src/api/Makefile])
AC_CONFIG_FILES([src/api/tess_version.h])
AC_CONFIG_FILES([src/arch/Makefile])
AC_CONFIG_FILES([src/ccmain/Makefile])
AC_CONFIG_FILES([src/opencl/Makefile])
AC_CONFIG_FILES([src/ccstruct/Makefile])
AC_CONFIG_FILES([src/ccutil/Makefile])
AC_CONFIG_FILES([src/classify/Makefile])
AC_CONFIG_FILES([src/cutil/Makefile])
AC_CONFIG_FILES([src/dict/Makefile])
AC_CONFIG_FILES([src/lstm/Makefile])
AC_CONFIG_FILES([src/textord/Makefile])
AC_CONFIG_FILES([src/viewer/Makefile])
AC_CONFIG_FILES([src/wordrec/Makefile])
AC_CONFIG_FILES([tessdata/Makefile])
AC_CONFIG_FILES([tessdata/configs/Makefile])
AC_CONFIG_FILES([tessdata/tessconfigs/Makefile])
Expand Down
Loading

1 comment on commit e95ff11

@zdenop
Copy link
Contributor

@zdenop zdenop commented on e95ff11 Apr 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@egorpugin : can you please check your git config?

Please sign in to comment.