From 3fa25d9bbc35161be347afd9d805a11af59ad89f Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Fri, 23 Mar 2018 23:28:51 +0300 Subject: [PATCH] Install training tools with CMake. --- .gitignore | 4 +++- CMakeLists.txt | 3 ++- training/CMakeLists.txt | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 73ab96cd..b3ad5f96 100644 --- a/.gitignore +++ b/.gitignore @@ -86,7 +86,9 @@ kernel*.bin /*.lib /*.exe /*.lnk -/win* +/win* +.vs* +.s* # GoogleTest googletest diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a74c933..5e3c788b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,8 @@ project(tesseract C CXX) set(VERSION_MAJOR 4) set(VERSION_MINOR 0) -set(VERSION_PLAIN ${VERSION_MAJOR}.${VERSION_MINOR}.0-beta.1) +set(VERSION_PATCH 0) +set(VERSION_PLAIN ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-beta.1) set(MINIMUM_LEPTONICA_VERSION 1.74) diff --git a/training/CMakeLists.txt b/training/CMakeLists.txt index b3908a11..8de67772 100644 --- a/training/CMakeLists.txt +++ b/training/CMakeLists.txt @@ -89,6 +89,7 @@ project_group (common_training "Training Tools") add_executable (ambiguous_words ambiguous_words.cpp) target_link_libraries (ambiguous_words libtesseract) project_group (ambiguous_words "Training Tools") +install (TARGETS ambiguous_words RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -98,6 +99,7 @@ project_group (ambiguous_words "Training Tools") add_executable (classifier_tester classifier_tester.cpp) target_link_libraries (classifier_tester common_training) project_group (classifier_tester "Training Tools") +install (TARGETS classifier_tester RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -107,6 +109,7 @@ project_group (classifier_tester "Training Tools") add_executable (combine_tessdata combine_tessdata.cpp) target_link_libraries (combine_tessdata libtesseract) project_group (combine_tessdata "Training Tools") +install (TARGETS combine_tessdata RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -116,6 +119,7 @@ project_group (combine_tessdata "Training Tools") add_executable (cntraining cntraining.cpp) target_link_libraries (cntraining common_training) project_group (cntraining "Training Tools") +install (TARGETS cntraining RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -125,6 +129,7 @@ project_group (cntraining "Training Tools") add_executable (dawg2wordlist dawg2wordlist.cpp) target_link_libraries (dawg2wordlist libtesseract) project_group (dawg2wordlist "Training Tools") +install (TARGETS dawg2wordlist RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -134,6 +139,7 @@ project_group (dawg2wordlist "Training Tools") add_executable (mftraining mftraining.cpp mergenf.cpp mergenf.h) target_link_libraries (mftraining common_training) project_group (mftraining "Training Tools") +install (TARGETS mftraining RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -143,6 +149,7 @@ project_group (mftraining "Training Tools") add_executable (shapeclustering shapeclustering.cpp) target_link_libraries (shapeclustering common_training) project_group (shapeclustering "Training Tools") +install (TARGETS shapeclustering RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -152,6 +159,7 @@ project_group (shapeclustering "Training Tools") add_executable (wordlist2dawg wordlist2dawg.cpp) target_link_libraries (wordlist2dawg libtesseract) project_group (wordlist2dawg "Training Tools") +install (TARGETS wordlist2dawg RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) if (ICU_FOUND) @@ -199,6 +207,7 @@ project_group (unicharset_training "Training Tools") add_executable (combine_lang_model combine_lang_model.cpp) target_link_libraries (combine_lang_model unicharset_training) project_group (combine_lang_model "Training Tools") +install (TARGETS combine_lang_model RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -208,6 +217,7 @@ project_group (combine_lang_model "Training Tools") add_executable (lstmeval lstmeval.cpp) target_link_libraries (lstmeval unicharset_training) project_group (lstmeval "Training Tools") +install (TARGETS lstmeval RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -217,6 +227,7 @@ project_group (lstmeval "Training Tools") add_executable (lstmtraining lstmtraining.cpp) target_link_libraries (lstmtraining unicharset_training) project_group (lstmtraining "Training Tools") +install (TARGETS lstmtraining RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -226,6 +237,7 @@ project_group (lstmtraining "Training Tools") add_executable (set_unicharset_properties set_unicharset_properties.cpp) target_link_libraries (set_unicharset_properties unicharset_training) project_group (set_unicharset_properties "Training Tools") +install (TARGETS set_unicharset_properties RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -235,6 +247,7 @@ project_group (set_unicharset_properties "Training Tools") add_executable (unicharset_extractor unicharset_extractor.cpp) target_link_libraries (unicharset_extractor libtesseract tessopt unicharset_training) project_group (unicharset_extractor "Training Tools") +install (TARGETS unicharset_extractor RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) ######################################## @@ -292,6 +305,7 @@ if (CPPAN_BUILD) target_link_libraries (text2image pvt.cppan.demo.gnome.pango.pangocairo) endif() project_group (text2image "Training Tools") +install (TARGETS text2image RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib) endif() endif(ICU_FOUND)