Skip to content

Commit e95ff11

Browse files
committed
Move sources into src dir. Update build scripts.
1 parent e8fceb5 commit e95ff11

File tree

518 files changed

+33889
-33886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

518 files changed

+33889
-33886
lines changed

CMakeLists.txt

+120-120
Original file line numberDiff line numberDiff line change
@@ -128,14 +128,14 @@ configure_file(${AUTOCONFIG_SRC} ${AUTOCONFIG} @ONLY)
128128
set(INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" "${CMAKE_INSTALL_PREFIX}/include/tesseract")
129129

130130
configure_file(
131-
${CMAKE_SOURCE_DIR}/api/tess_version.h.in
132-
${CMAKE_BINARY_DIR}/api/tess_version.h @ONLY)
131+
${CMAKE_SOURCE_DIR}/src/api/tess_version.h.in
132+
${CMAKE_BINARY_DIR}/src/api/tess_version.h @ONLY)
133133
configure_file(
134-
${CMAKE_SOURCE_DIR}/vs2010/tesseract/tesseract.rc.in
135-
${CMAKE_BINARY_DIR}/vs2010/tesseract/tesseract.rc @ONLY)
134+
${CMAKE_SOURCE_DIR}/src/vs2010/tesseract/tesseract.rc.in
135+
${CMAKE_BINARY_DIR}/src/vs2010/tesseract/tesseract.rc @ONLY)
136136
configure_file(
137-
${CMAKE_SOURCE_DIR}/vs2010/tesseract/libtesseract.rc.in
138-
${CMAKE_BINARY_DIR}/vs2010/tesseract/libtesseract.rc @ONLY)
137+
${CMAKE_SOURCE_DIR}/src/vs2010/tesseract/libtesseract.rc.in
138+
${CMAKE_BINARY_DIR}/src/vs2010/tesseract/libtesseract.rc @ONLY)
139139
configure_file(
140140
${CMAKE_SOURCE_DIR}/cmake/templates/TesseractConfig-version.cmake.in
141141
${CMAKE_BINARY_DIR}/TesseractConfig-version.cmake @ONLY)
@@ -160,101 +160,101 @@ include_directories(${Leptonica_INCLUDE_DIRS})
160160

161161
include_directories(${CMAKE_BINARY_DIR})
162162

163-
include_directories(api)
163+
include_directories(src/api)
164164
include_directories(${CMAKE_BINARY_DIR}/api)
165-
include_directories(arch)
166-
include_directories(ccmain)
167-
include_directories(ccstruct)
168-
include_directories(ccutil)
169-
include_directories(classify)
170-
include_directories(cutil)
171-
include_directories(dict)
172-
include_directories(lstm)
173-
include_directories(opencl)
174-
include_directories(textord)
175-
include_directories(vs2010/port)
176-
include_directories(viewer)
177-
include_directories(wordrec)
165+
include_directories(src/arch)
166+
include_directories(src/ccmain)
167+
include_directories(src/ccstruct)
168+
include_directories(src/ccutil)
169+
include_directories(src/classify)
170+
include_directories(src/cutil)
171+
include_directories(src/dict)
172+
include_directories(src/lstm)
173+
include_directories(src/opencl)
174+
include_directories(src/textord)
175+
include_directories(src/vs2010/port)
176+
include_directories(src/viewer)
177+
include_directories(src/wordrec)
178178

179179
########################################
180180
# LIBRARY tesseract
181181
########################################
182182

183183
file(GLOB tesseract_src
184-
arch/*.cpp
185-
ccmain/*.cpp
186-
ccstruct/*.cpp
187-
ccutil/*.cpp
188-
classify/*.cpp
189-
cutil/*.cpp
190-
dict/*.cpp
191-
lstm/*.cpp
192-
opencl/*.cpp
193-
textord/*.cpp
194-
viewer/*.cpp
195-
wordrec/*.cpp
184+
src/arch/*.cpp
185+
src/ccmain/*.cpp
186+
src/ccstruct/*.cpp
187+
src/ccutil/*.cpp
188+
src/classify/*.cpp
189+
src/cutil/*.cpp
190+
src/dict/*.cpp
191+
src/lstm/*.cpp
192+
src/opencl/*.cpp
193+
src/textord/*.cpp
194+
src/viewer/*.cpp
195+
src/wordrec/*.cpp
196196
)
197197
file(GLOB tesseract_hdr
198-
api/*.h
199-
arch/*.h
200-
ccmain/*.h
201-
ccstruct/*.h
202-
ccutil/*.h
203-
classify/*.h
204-
cutil/*.h
205-
dict/*.h
206-
lstm/*.h
207-
opencl/*.h
208-
textord/*.h
209-
viewer/*.h
210-
wordrec/*.h
198+
src/api/*.h
199+
src/arch/*.h
200+
src/ccmain/*.h
201+
src/ccstruct/*.h
202+
src/ccutil/*.h
203+
src/classify/*.h
204+
src/cutil/*.h
205+
src/dict/*.h
206+
src/lstm/*.h
207+
src/opencl/*.h
208+
src/textord/*.h
209+
src/viewer/*.h
210+
src/wordrec/*.h
211211
)
212212
if (WIN32)
213-
file(GLOB tesseract_win32_src "vs2010/port/*.cpp")
214-
file(GLOB tesseract_win32_hdr "vs2010/port/*.h")
213+
file(GLOB tesseract_win32_src "src/vs2010/port/*.cpp")
214+
file(GLOB tesseract_win32_hdr "src/vs2010/port/*.h")
215215
set(tesseract_src ${tesseract_src} ${tesseract_win32_src})
216216
set(tesseract_hdr ${tesseract_hdr} ${tesseract_win32_hdr})
217217
endif()
218218

219219
set(tesseract_src ${tesseract_src}
220-
api/baseapi.cpp
221-
api/capi.cpp
222-
api/renderer.cpp
223-
api/pdfrenderer.cpp
220+
src/api/baseapi.cpp
221+
src/api/capi.cpp
222+
src/api/renderer.cpp
223+
src/api/pdfrenderer.cpp
224224
)
225225

226226
if (WIN32)
227227
if (MSVC)
228-
include_directories(vs2010/tesseract)
228+
include_directories(src/vs2010/tesseract)
229229
set(tesseract_hdr
230230
${tesseract_hdr}
231-
${CMAKE_CURRENT_SOURCE_DIR}/vs2010/tesseract/resource.h)
232-
set(tesseract_rsc ${CMAKE_BINARY_DIR}/vs2010/tesseract/libtesseract.rc)
231+
${CMAKE_CURRENT_SOURCE_DIR}/src/vs2010/tesseract/resource.h)
232+
set(tesseract_rsc ${CMAKE_BINARY_DIR}/src/vs2010/tesseract/libtesseract.rc)
233233
set_source_files_properties(
234-
${CMAKE_CURRENT_SOURCE_DIR}/arch/dotproductsse.cpp
234+
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductsse.cpp
235235
PROPERTIES COMPILE_DEFINITIONS __SSE4_1__)
236236
set_source_files_properties(
237-
${CMAKE_CURRENT_SOURCE_DIR}/arch/intsimdmatrixsse.cpp
237+
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixsse.cpp
238238
PROPERTIES COMPILE_DEFINITIONS __SSE4_1__)
239239
set_source_files_properties(
240-
${CMAKE_CURRENT_SOURCE_DIR}/arch/dotproductavx.cpp
240+
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductavx.cpp
241241
PROPERTIES COMPILE_FLAGS "/arch:AVX")
242242
set_source_files_properties(
243-
${CMAKE_CURRENT_SOURCE_DIR}/arch/intsimdmatrixavx2.cpp
243+
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixavx2.cpp
244244
PROPERTIES COMPILE_FLAGS "/arch:AVX2")
245245
endif()
246246
else()
247247
set_source_files_properties(
248-
${CMAKE_CURRENT_SOURCE_DIR}/arch/dotproductsse.cpp
248+
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductsse.cpp
249249
PROPERTIES COMPILE_FLAGS "-msse4.1")
250250
set_source_files_properties(
251-
${CMAKE_CURRENT_SOURCE_DIR}/arch/intsimdmatrixsse.cpp
251+
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixsse.cpp
252252
PROPERTIES COMPILE_FLAGS "-msse4.1")
253253
set_source_files_properties(
254-
${CMAKE_CURRENT_SOURCE_DIR}/arch/dotproductavx.cpp
254+
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/dotproductavx.cpp
255255
PROPERTIES COMPILE_FLAGS "-mavx")
256256
set_source_files_properties(
257-
${CMAKE_CURRENT_SOURCE_DIR}/arch/intsimdmatrixavx2.cpp
257+
${CMAKE_CURRENT_SOURCE_DIR}/src/arch/intsimdmatrixavx2.cpp
258258
PROPERTIES COMPILE_FLAGS "-mavx2")
259259
endif()
260260

@@ -291,7 +291,7 @@ endif()
291291
# EXECUTABLE tesseractmain
292292
########################################
293293

294-
set(tesseractmain_src api/tesseractmain.cpp)
294+
set(tesseractmain_src src/api/tesseractmain.cpp)
295295
if (MSVC)
296296
set(tesseractmain_rsc ${CMAKE_BINARY_DIR}/vs2010/tesseract/tesseract.rc)
297297
endif()
@@ -326,74 +326,74 @@ install(FILES
326326

327327
install(FILES
328328
# from api/makefile.am
329-
api/apitypes.h
330-
api/baseapi.h
331-
api/capi.h
332-
api/renderer.h
329+
src/api/apitypes.h
330+
src/api/baseapi.h
331+
src/api/capi.h
332+
src/api/renderer.h
333333
${CMAKE_CURRENT_BINARY_DIR}/api/tess_version.h
334334

335335
#from arch/makefile.am
336-
arch/dotproductavx.h
337-
arch/dotproductsse.h
338-
arch/intsimdmatrix.h
339-
arch/intsimdmatrixavx2.h
340-
arch/intsimdmatrixsse.h
341-
arch/simddetect.h
336+
src/arch/dotproductavx.h
337+
src/arch/dotproductsse.h
338+
src/arch/intsimdmatrix.h
339+
src/arch/intsimdmatrixavx2.h
340+
src/arch/intsimdmatrixsse.h
341+
src/arch/simddetect.h
342342

343343
#from ccmain/makefile.am
344-
ccmain/thresholder.h
345-
ccmain/ltrresultiterator.h
346-
ccmain/pageiterator.h
347-
ccmain/resultiterator.h
348-
ccmain/osdetect.h
344+
src/ccmain/thresholder.h
345+
src/ccmain/ltrresultiterator.h
346+
src/ccmain/pageiterator.h
347+
src/ccmain/resultiterator.h
348+
src/ccmain/osdetect.h
349349

350350
#from ccstruct/makefile.am
351-
ccstruct/publictypes.h
351+
src/ccstruct/publictypes.h
352352

353353
#from ccutil/makefile.am
354-
ccutil/basedir.h
355-
ccutil/errcode.h
356-
ccutil/fileerr.h
357-
ccutil/genericvector.h
358-
ccutil/helpers.h
359-
ccutil/host.h
360-
ccutil/memry.h
361-
ccutil/ndminx.h
362-
ccutil/params.h
363-
ccutil/ocrclass.h
364-
ccutil/platform.h
365-
ccutil/serialis.h
366-
ccutil/strngs.h
367-
ccutil/tesscallback.h
368-
ccutil/unichar.h
369-
ccutil/unicharcompress.h
370-
ccutil/unicharmap.h
371-
ccutil/unicharset.h
354+
src/ccutil/basedir.h
355+
src/ccutil/errcode.h
356+
src/ccutil/fileerr.h
357+
src/ccutil/genericvector.h
358+
src/ccutil/helpers.h
359+
src/ccutil/host.h
360+
src/ccutil/memry.h
361+
src/ccutil/ndminx.h
362+
src/ccutil/params.h
363+
src/ccutil/ocrclass.h
364+
src/ccutil/platform.h
365+
src/ccutil/serialis.h
366+
src/ccutil/strngs.h
367+
src/ccutil/tesscallback.h
368+
src/ccutil/unichar.h
369+
src/ccutil/unicharcompress.h
370+
src/ccutil/unicharmap.h
371+
src/ccutil/unicharset.h
372372

373373
#from lstm/makefile.am
374-
lstm/convolve.h
375-
lstm/ctc.h
376-
lstm/fullyconnected.h
377-
lstm/functions.h
378-
lstm/input.h
379-
lstm/lstm.h
380-
lstm/lstmrecognizer.h
381-
lstm/lstmtrainer.h
382-
lstm/maxpool.h
383-
lstm/networkbuilder.h
384-
lstm/network.h
385-
lstm/networkio.h
386-
lstm/networkscratch.h
387-
lstm/parallel.h
388-
lstm/plumbing.h
389-
lstm/recodebeam.h
390-
lstm/reconfig.h
391-
lstm/reversed.h
392-
lstm/series.h
393-
lstm/static_shape.h
394-
lstm/stridemap.h
395-
lstm/tfnetwork.h
396-
lstm/weightmatrix.h
374+
src/lstm/convolve.h
375+
src/lstm/ctc.h
376+
src/lstm/fullyconnected.h
377+
src/lstm/functions.h
378+
src/lstm/input.h
379+
src/lstm/lstm.h
380+
src/lstm/lstmrecognizer.h
381+
src/lstm/lstmtrainer.h
382+
src/lstm/maxpool.h
383+
src/lstm/networkbuilder.h
384+
src/lstm/network.h
385+
src/lstm/networkio.h
386+
src/lstm/networkscratch.h
387+
src/lstm/parallel.h
388+
src/lstm/plumbing.h
389+
src/lstm/recodebeam.h
390+
src/lstm/reconfig.h
391+
src/lstm/reversed.h
392+
src/lstm/series.h
393+
src/lstm/static_shape.h
394+
src/lstm/stridemap.h
395+
src/lstm/tfnetwork.h
396+
src/lstm/weightmatrix.h
397397

398398
#${CMAKE_BINARY_DIR}/src/endianness.h
399399
DESTINATION include/tesseract)

configure.ac

+15-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ AC_LANG_COMPILER_REQUIRE
1616
CXXFLAGS=${CXXFLAGS:-""}
1717
AC_CONFIG_MACRO_DIR([m4])
1818
AC_CONFIG_AUX_DIR([config])
19-
AC_CONFIG_SRCDIR([api/tesseractmain.cpp])
19+
AC_CONFIG_SRCDIR([src/api/tesseractmain.cpp])
2020
AC_PREFIX_DEFAULT([/usr/local])
2121

2222
# Automake configuration. Do not require README file (we use README.md).
@@ -476,20 +476,20 @@ fi
476476
477477
# Output files
478478
AC_CONFIG_FILES([Makefile tesseract.pc])
479-
AC_CONFIG_FILES([api/Makefile])
480-
AC_CONFIG_FILES([api/tess_version.h])
481-
AC_CONFIG_FILES([arch/Makefile])
482-
AC_CONFIG_FILES([ccmain/Makefile])
483-
AC_CONFIG_FILES([opencl/Makefile])
484-
AC_CONFIG_FILES([ccstruct/Makefile])
485-
AC_CONFIG_FILES([ccutil/Makefile])
486-
AC_CONFIG_FILES([classify/Makefile])
487-
AC_CONFIG_FILES([cutil/Makefile])
488-
AC_CONFIG_FILES([dict/Makefile])
489-
AC_CONFIG_FILES([lstm/Makefile])
490-
AC_CONFIG_FILES([textord/Makefile])
491-
AC_CONFIG_FILES([viewer/Makefile])
492-
AC_CONFIG_FILES([wordrec/Makefile])
479+
AC_CONFIG_FILES([src/api/Makefile])
480+
AC_CONFIG_FILES([src/api/tess_version.h])
481+
AC_CONFIG_FILES([src/arch/Makefile])
482+
AC_CONFIG_FILES([src/ccmain/Makefile])
483+
AC_CONFIG_FILES([src/opencl/Makefile])
484+
AC_CONFIG_FILES([src/ccstruct/Makefile])
485+
AC_CONFIG_FILES([src/ccutil/Makefile])
486+
AC_CONFIG_FILES([src/classify/Makefile])
487+
AC_CONFIG_FILES([src/cutil/Makefile])
488+
AC_CONFIG_FILES([src/dict/Makefile])
489+
AC_CONFIG_FILES([src/lstm/Makefile])
490+
AC_CONFIG_FILES([src/textord/Makefile])
491+
AC_CONFIG_FILES([src/viewer/Makefile])
492+
AC_CONFIG_FILES([src/wordrec/Makefile])
493493
AC_CONFIG_FILES([tessdata/Makefile])
494494
AC_CONFIG_FILES([tessdata/configs/Makefile])
495495
AC_CONFIG_FILES([tessdata/tessconfigs/Makefile])

0 commit comments

Comments
 (0)