Add libarchive dependency to cppan and sw builds.

This commit is contained in:
Egor Pugin 2019-03-11 00:03:45 +03:00
parent 5cfe4cc1f0
commit 37b0c36e32
5 changed files with 11 additions and 3 deletions

View File

@ -354,7 +354,10 @@ set_target_properties (libtesseract PROPERTIES OUTPUT_NAME tesseract)
endif()
if (CPPAN_BUILD)
target_link_libraries (libtesseract pvt.cppan.demo.danbloomberg.leptonica)
target_link_libraries (libtesseract PUBLIC
pvt.cppan.demo.danbloomberg.leptonica
pvt.cppan.demo.libarchive.libarchive
)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/TesseractTargets.cmake "include(${CMAKE_CURRENT_BINARY_DIR}/cppan.cmake)\n")
export(TARGETS libtesseract APPEND FILE ${CMAKE_CURRENT_BINARY_DIR}/TesseractTargets.cmake)
else()

View File

@ -16,6 +16,7 @@ local_settings:
dependencies:
pvt.cppan.demo.danbloomberg.leptonica: 1
pvt.cppan.demo.libarchive.libarchive: 3
pvt.cppan.demo.unicode.icu.i18n: "*"
root_project: pvt.cppan.demo.google.tesseract
@ -141,6 +142,7 @@ projects:
definitions:
public:
- HAVE_CONFIG_H
- HAVE_LIBARCHIVE
- _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1
- WINDLLNAME="tesseract"
shared:
@ -152,6 +154,7 @@ projects:
dependencies:
pvt.cppan.demo.danbloomberg.leptonica: 1
pvt.cppan.demo.libarchive.libarchive: 3
tesseract:
files: src/api/tesseractmain.cpp

@ -1 +1 @@
Subproject commit bf07131c1d0a4e001daeee8936089f8b438b7f30
Subproject commit 2fe3bd994b3189899d93f1d5a881e725e046fdc2

2
sw.cpp
View File

@ -71,10 +71,12 @@ void build(Solution &s)
libtesseract.Public += "HAVE_CONFIG_H"_d;
libtesseract.Public += "WINDLLNAME=\"tesseract\""_d;
libtesseract.Public += "_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1"_d;
libtesseract.Public += "HAVE_LIBARCHIVE"_d;
libtesseract.Interface += sw::Shared, "TESS_IMPORTS"_d;
libtesseract.Private += sw::Shared, "TESS_EXPORTS"_d;
libtesseract.Public += "org.sw.demo.danbloomberg.leptonica-master"_dep;
libtesseract.Public += "org.sw.demo.libarchive.libarchive"_dep;
if (s.Settings.TargetOS.Type == OSType::Windows)
libtesseract.Public += "ws2_32.lib"_l;

2
test

@ -1 +1 @@
Subproject commit 6dd816cdaf3e76153271daf773e562e24c928bf5
Subproject commit 1a223c9254341a3b2b21f83aa4637d06fa31dafb