2
2
# tesseract
3
3
#
4
4
5
- add_definitions (-DPANGO_ENABLE_ENGINE )
5
+ if ( STATIC )
6
6
7
7
########################################
8
8
# LIBRARY tessopt
@@ -13,30 +13,28 @@ project_group (tessopt "Training Tools")
13
13
14
14
15
15
########################################
16
- # LIBRARY training
16
+ # LIBRARY common_training
17
17
########################################
18
18
19
- set (training_src
20
- boxchar.cpp commandlineflags.cpp commontraining.cpp degradeimage.cpp
21
- fileio.cpp ligature_table.cpp normstrngs.cpp pango_font_info.cpp
22
- stringrenderer.cpp tlog.cpp unicharset_training_utils.cpp
19
+ set (common_training_src
20
+ commandlineflags.cpp
21
+ commontraining.cpp
23
22
)
24
- set (training_hdr
25
- boxchar.h commandlineflags.h commontraining.h degradeimage.h
26
- fileio.h icuerrorcode.h ligature_table.h normstrngs.h
27
- mergenf.h pango_font_info.h stringrenderer.h
28
- tessopt.h tlog.h unicharset_training_utils.h util.h
23
+ set (common_training_hdr
24
+ commandlineflags.h
25
+ commontraining.h
29
26
)
30
- add_library (training ${training_src} ${training_hdr} )
31
- project_group (training "Training Tools" )
27
+ add_library (common_training ${common_training_src} ${common_training_hdr} )
28
+ target_link_libraries (common_training tessopt)
29
+ project_group (common_training "Training Tools" )
32
30
33
31
34
32
########################################
35
33
# EXECUTABLE ambiguous_words
36
34
########################################
37
35
38
36
add_executable (ambiguous_words ambiguous_words.cpp)
39
- target_link_libraries (ambiguous_words tesseract training tessopt )
37
+ target_link_libraries (ambiguous_words tesseract)
40
38
project_group (ambiguous_words "Training Tools" )
41
39
42
40
@@ -45,7 +43,7 @@ project_group (ambiguous_words "Training Tools")
45
43
########################################
46
44
47
45
add_executable (classifier_tester classifier_tester.cpp)
48
- target_link_libraries (classifier_tester tesseract training tessopt )
46
+ target_link_libraries (classifier_tester tesseract common_training )
49
47
project_group (classifier_tester "Training Tools" )
50
48
51
49
@@ -63,7 +61,7 @@ project_group (combine_tessdata "Training Tools")
63
61
########################################
64
62
65
63
add_executable (cntraining cntraining.cpp)
66
- target_link_libraries (cntraining tesseract training tessopt )
64
+ target_link_libraries (cntraining tesseract common_training )
67
65
project_group (cntraining "Training Tools" )
68
66
69
67
@@ -72,7 +70,7 @@ project_group (cntraining "Training Tools")
72
70
########################################
73
71
74
72
add_executable (dawg2wordlist dawg2wordlist.cpp)
75
- target_link_libraries (dawg2wordlist tesseract training tessopt )
73
+ target_link_libraries (dawg2wordlist tesseract)
76
74
project_group (dawg2wordlist "Training Tools" )
77
75
78
76
@@ -81,60 +79,93 @@ project_group (dawg2wordlist "Training Tools")
81
79
########################################
82
80
83
81
add_executable (mftraining mftraining.cpp mergenf.cpp)
84
- target_link_libraries (mftraining tesseract training tessopt )
82
+ target_link_libraries (mftraining tesseract common_training )
85
83
project_group (mftraining "Training Tools" )
86
84
87
85
88
86
########################################
89
- # EXECUTABLE set_unicharset_properties
87
+ # EXECUTABLE shapeclustering
90
88
########################################
91
89
92
- add_executable (set_unicharset_properties set_unicharset_properties .cpp)
93
- target_link_libraries (set_unicharset_properties tesseract training tessopt ${ICU_LIBRARIES} )
94
- project_group (set_unicharset_properties "Training Tools" )
90
+ add_executable (shapeclustering shapeclustering .cpp)
91
+ target_link_libraries (shapeclustering tesseract common_training )
92
+ project_group (shapeclustering "Training Tools" )
95
93
96
94
97
95
########################################
98
- # EXECUTABLE shapeclustering
96
+ # EXECUTABLE unicharset_extractor
99
97
########################################
100
98
101
- add_executable (shapeclustering shapeclustering .cpp)
102
- target_link_libraries (shapeclustering tesseract training tessopt)
103
- project_group (shapeclustering "Training Tools" )
99
+ add_executable (unicharset_extractor unicharset_extractor .cpp)
100
+ target_link_libraries (unicharset_extractor tesseract tessopt)
101
+ project_group (unicharset_extractor "Training Tools" )
104
102
105
103
106
104
########################################
107
- # EXECUTABLE text2image
105
+ # EXECUTABLE wordlist2dawg
108
106
########################################
109
107
110
- add_executable (text2image text2image.cpp)
111
- target_link_libraries (text2image tesseract training tessopt
112
- ${ICU_LIBRARIES}
113
- ${Pango_LIBRARIES}
114
- ${Cairo_LIBRARIES}
115
- ${PangoCairo_LIBRARIES}
116
- ${PangoFt2_LIBRARIES}
117
- ${FontConfig_LIBRARIES}
108
+ add_executable (wordlist2dawg wordlist2dawg.cpp)
109
+ target_link_libraries (wordlist2dawg tesseract)
110
+ project_group (wordlist2dawg "Training Tools" )
111
+
112
+
113
+ endif (STATIC )
114
+
115
+ ###############################################################################
116
+ # UNCHECKED
117
+ ###############################################################################
118
+
119
+ if (BUILD_TRAINING)
120
+
121
+ add_definitions (-DPANGO_ENABLE_ENGINE)
122
+
123
+ ########################################
124
+ # LIBRARY training ?
125
+ ########################################
126
+
127
+ set (training_src
128
+ boxchar.cpp commandlineflags.cpp commontraining.cpp degradeimage.cpp
129
+ fileio.cpp ligature_table.cpp normstrngs.cpp pango_font_info.cpp
130
+ stringrenderer.cpp tlog.cpp unicharset_training_utils.cpp
118
131
)
119
- project_group (text2image "Training Tools" )
132
+ set (training_hdr
133
+ boxchar.h commandlineflags.h commontraining.h degradeimage.h
134
+ fileio.h icuerrorcode.h ligature_table.h normstrngs.h
135
+ mergenf.h pango_font_info.h stringrenderer.h
136
+ tessopt.h tlog.h unicharset_training_utils.h util.h
137
+ )
138
+ add_library (training ${training_src} ${training_hdr} )
139
+ project_group (training "Training Tools" )
120
140
121
141
122
142
########################################
123
- # EXECUTABLE unicharset_extractor
143
+ # EXECUTABLE set_unicharset_properties ?
124
144
########################################
125
145
126
- add_executable (unicharset_extractor unicharset_extractor.cpp)
127
- target_link_libraries (unicharset_extractor tesseract tessopt)
128
- project_group (unicharset_extractor "Training Tools" )
146
+ add_executable (set_unicharset_properties
147
+ set_unicharset_properties.cpp
148
+ unicharset_training_utils.cpp
149
+ )
150
+ target_link_libraries (set_unicharset_properties tesseract common_training ${ICU_LIBRARIES} )
151
+ project_group (set_unicharset_properties "Training Tools" )
129
152
130
153
131
154
########################################
132
- # EXECUTABLE wordlist2dawg
155
+ # EXECUTABLE text2image ?
133
156
########################################
134
157
135
- add_executable (wordlist2dawg wordlist2dawg.cpp)
136
- target_link_libraries (wordlist2dawg tesseract tessopt)
137
- project_group (wordlist2dawg "Training Tools" )
158
+ add_executable (text2image text2image.cpp)
159
+ target_link_libraries (text2image tesseract training tessopt
160
+ ${ICU_LIBRARIES}
161
+ ${Pango_LIBRARIES}
162
+ ${Cairo_LIBRARIES}
163
+ ${PangoCairo_LIBRARIES}
164
+ ${PangoFt2_LIBRARIES}
165
+ ${FontConfig_LIBRARIES}
166
+ )
167
+ project_group (text2image "Training Tools" )
138
168
169
+ endif (BUILD_TRAINING)
139
170
140
171
###############################################################################
0 commit comments