1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-10-05 19:41:40 +00:00

Fixed Linux build. Link with all libraries under MINGW only.

This commit is contained in:
Marc Sanfacon 2013-11-24 10:20:25 -05:00
parent 57c02b1972
commit c1f3fa6178
2 changed files with 25 additions and 15 deletions

View File

@ -131,8 +131,9 @@ else()
endif()
# Add additional dependencies
if(MINGW)
set(PDF2HTMLEX_LIBS ${PDF2HTMLEX_LIBS} intl iconv gettextlib gettextpo gutils png jpeg openjpeg glib-2.0.dll z xml2 tiff gio-2.0.dll ltdl plibc.dll)
endif()
# debug build flags (overwrite default cmake debug flags)
set(CMAKE_C_FLAGS_DEBUG "-ggdb -pg")

View File

@ -58,9 +58,17 @@ void TmpFiles::clean()
double TmpFiles::get_total_size() const
{
double total_size = 0;
#ifndef _WIN32
struct stat st;
#else
struct _stat st;
#endif
for(auto iter = tmp_files.begin(); iter != tmp_files.end(); ++iter) {
#ifndef _WIN32
stat(iter->c_str(), &st);
#else
_stat(iter->c_str(), &st);
#endif
total_size += st.st_size;
}
@ -68,3 +76,4 @@ double TmpFiles::get_total_size() const
}
} // namespace pdf2htmlEX