Skip to content

Commit f29f95c

Browse files
Fix poppler build with certain CMake versions. link_libraries() can't have trailing whitespace
1 parent 44cb558 commit f29f95c

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- CMakeLists.txt 2020-01-26 06:00:50.339000000 +0200
2+
+++ CMakeLists.txt 2020-01-26 06:01:56.033000000 +0200
3+
@@ -505,6 +505,7 @@
4+
get_target_property(POPPLER_SOVERSION poppler SOVERSION)
5+
set_target_properties(poppler PROPERTIES SUFFIX "-${POPPLER_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
6+
endif()
7+
+string(STRIP "${poppler_LIBS}" poppler_LIBS)
8+
target_link_libraries(poppler LINK_PRIVATE ${poppler_LIBS})
9+
if(CMAKE_USE_PTHREADS_INIT)
10+
target_link_libraries(poppler LINK_PRIVATE Threads::Threads)

dependency-builder/src/main/cpp/packages/poppler-Patch-Source.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ CAIRO_LIBS=`$THIRDPARTY_PREFIX/bin/pkg-config --libs cairo`
1616
sed -i "/set(poppler_LIBS \${FREETYPE_LIBRARIES})/a if(CAIRO_FOUND)\n set(poppler_LIBS \${poppler_LIBS} $CAIRO_LIBS)\nendif()" $CMAKELISTS
1717

1818
patch $1/CMakeLists.txt <$BASEDIR/poppler-Patch-Source-use-fontconfig.patch
19+
patch $1/CMakeLists.txt <$BASEDIR/poppler-Patch-Source-trim-whitespace-from-libs.patch
1920

0 commit comments

Comments
 (0)