mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-27 20:59:36 +08:00
[sw] Fix mingw build.
This commit is contained in:
parent
04a7650b51
commit
916875d74a
11
sw.cpp
11
sw.cpp
@ -60,6 +60,11 @@ void build(Solution &s)
|
||||
}
|
||||
}
|
||||
|
||||
auto win_or_mingw =
|
||||
libtesseract.getBuildSettings().TargetOS.Type == OSType::Windows ||
|
||||
libtesseract.getBuildSettings().TargetOS.Type == OSType::Mingw
|
||||
;
|
||||
|
||||
// check fma flags
|
||||
libtesseract -= "src/arch/dotproductfma.cpp";
|
||||
|
||||
@ -69,9 +74,9 @@ void build(Solution &s)
|
||||
libtesseract["src/arch/dotproductsse.cpp"].args.push_back("-msse4.1");
|
||||
libtesseract["src/arch/intsimdmatrixsse.cpp"].args.push_back("-msse4.1");
|
||||
libtesseract["src/arch/intsimdmatrixavx2.cpp"].args.push_back("-mavx2");
|
||||
|
||||
libtesseract += "pthread"_slib;
|
||||
}
|
||||
if (!win_or_mingw)
|
||||
libtesseract += "pthread"_slib;
|
||||
|
||||
libtesseract.Public += "HAVE_CONFIG_H"_d;
|
||||
libtesseract.Public += "_SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS=1"_d;
|
||||
@ -82,7 +87,7 @@ void build(Solution &s)
|
||||
libtesseract.Public += "org.sw.demo.danbloomberg.leptonica"_dep;
|
||||
libtesseract.Public += "org.sw.demo.libarchive.libarchive"_dep;
|
||||
|
||||
if (libtesseract.getBuildSettings().TargetOS.Type == OSType::Windows)
|
||||
if (win_or_mingw)
|
||||
{
|
||||
libtesseract.Public += "ws2_32.lib"_slib;
|
||||
libtesseract.Protected += "NOMINMAX"_def;
|
||||
|
Loading…
Reference in New Issue
Block a user