Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

autotools: Add rule for svpaint executable #3873

Merged
merged 1 commit into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ EXTRA_DIST += CMakeLists.txt tesseract.pc.cmake cmake VERSION

DIST_SUBDIRS = $(SUBDIRS)

EXTRA_PROGRAMS =

uninstall-hook:
rm -rf $(DESTDIR)$(pkgincludedir)

Expand Down Expand Up @@ -673,9 +675,16 @@ noinst_HEADERS += src/viewer/svutil.h
libtesseract_la_SOURCES += src/viewer/scrollview.cpp
libtesseract_la_SOURCES += src/viewer/svmnode.cpp
libtesseract_la_SOURCES += src/viewer/svutil.cpp
endif

# TODO: Add rule to generate svpaint from svpaint.cpp.
EXTRA_PROGRAMS += svpaint
svpaint_CPPFLAGS =
svpaint_CPPFLAGS += -I$(top_builddir)/include
svpaint_CPPFLAGS += -I$(top_srcdir)/include
svpaint_CPPFLAGS += -I$(top_srcdir)/src/ccstruct
svpaint_CPPFLAGS += -I$(top_srcdir)/src/viewer
svpaint_SOURCES = src/svpaint.cpp
svpaint_LDADD = libtesseract.la
endif

# Rules for src/wordrec.

Expand Down Expand Up @@ -758,12 +767,12 @@ endif

if ENABLE_TRAINING

training: $(EXTRA_PROGRAMS) | $(PROGRAMS)
training: $(trainingtools) | $(PROGRAMS)

training-install: $(EXTRA_PROGRAMS)
training-install: $(trainingtools)
mkdir -p $(DESTDIR)$(bindir)
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install \
$(INSTALL) $(INSTALL_STRIP_FLAG) $(EXTRA_PROGRAMS) $(DESTDIR)$(bindir)
$(INSTALL) $(INSTALL_STRIP_FLAG) $(trainingtools) $(DESTDIR)$(bindir)

training-uninstall:

Expand All @@ -773,15 +782,15 @@ check: libtesseract_training.la
# dawg_test runs dawg2wordlist and wordlist2dawg.
check: dawg2wordlist wordlist2dawg

CLEANFILES += $(EXTRA_PROGRAMS)

else

training:
@echo "Need to reconfigure project, so there are no errors"

endif

CLEANFILES += $(EXTRA_PROGRAMS)

training_CPPFLAGS := -DPANGO_ENABLE_ENGINE
training_CPPFLAGS += -DTESS_COMMON_TRAINING_API=
training_CPPFLAGS += -DTESS_PANGO_TRAINING_API=
Expand Down Expand Up @@ -908,7 +917,7 @@ endif

$(trainingtools): libtesseract.la

EXTRA_PROGRAMS = $(trainingtools)
EXTRA_PROGRAMS += $(trainingtools)

extralib = libtesseract.la
extralib += $(libarchive_LIBS)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion sw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ void build(Solution &s)

libtesseract -=
"src/tesseract.cpp",
Copy link
Collaborator

Choose a reason for hiding this comment

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

What about this line?

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe the lines 22...24 are no longer needed at all and can be removed.

"src/viewer/svpaint.cpp";
"src/svpaint.cpp";

libtesseract.Public += "include"_idir;
libtesseract.Protected +=
Expand Down