Skip to content

Commit 912c541

Browse files
committed
Merge branch 'release'
2 parents 2ddd6d4 + 48be278 commit 912c541

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

Applications/Cxx/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ if(GDCM_USE_SYSTEM_POPPLER)
122122
if(LIBPOPPLER_PDFDOC_HAS_OPTIONAL)
123123
list(APPEND libpoppler_flags -DLIBPOPPLER_PDFDOC_HAS_OPTIONAL)
124124
endif()
125+
CHECK_CXX_SOURCE_COMPILES(
126+
"\#include <poppler/goo/GooString.h>\nint main() { GooString gs; gs.size(); return 0; }"
127+
LIBPOPPLER_GOOSTRING_HAS_SIZE)
128+
if(LIBPOPPLER_GOOSTRING_HAS_SIZE)
129+
list(APPEND libpoppler_flags -DLIBPOPPLER_GOOSTRING_HAS_SIZE)
130+
endif()
125131
if(libpoppler_flags)
126132
string(REPLACE ";" " " libpoppler_flags_string "${libpoppler_flags}")
127133
set_source_files_properties(

Applications/Cxx/gdcminfo.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,11 @@ static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uM
297297
isUnicode = false;
298298
i = 0;
299299
}
300+
#ifdef LIBPOPPLER_GOOSTRING_HAS_SIZE
301+
while (i < obj.getString()->size())
302+
#else
300303
while (i < obj.getString()->getLength())
304+
#endif
301305
{
302306
if (isUnicode)
303307
{

Applications/Cxx/gdcmpdf.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,11 @@ static std::string getInfoString(Dict *infoDict, const char *key, UnicodeMap *uM
148148
isUnicode = false;
149149
i = 0;
150150
}
151+
#ifdef LIBPOPPLER_GOOSTRING_HAS_SIZE
152+
while (i < obj.getString()->size())
153+
#else
151154
while (i < obj.getString()->getLength())
155+
#endif
152156
{
153157
if (isUnicode)
154158
{

0 commit comments

Comments
 (0)