Commit 98f0804a authored by Ivan Yossi's avatar Ivan Yossi 👌

packaging macOS: Fix Poppler compile

Summary: patch added to fix mismatch on FindPackage iconv as it includes iconv from BUILDROOT but link against system iconv.dylib

Test Plan: Fresh build on poppler.

Reviewers: #krita, rempt

Reviewed By: #krita, rempt

Tags: #krita

Differential Revision: https://phabricator.kde.org/D20501
parent 70ac5d14
SET(PREFIX_ext_poppler "${EXTPREFIX}" )
list(APPEND _PopplerPatch_COMMAND
${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/no_tests.diff
)
if(APPLE)
list(APPEND _PopplerPatch_COMMAND
COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/mac_popplerIconv.patch
)
endif(APPLE)
ExternalProject_Add( ext_poppler
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL https://poppler.freedesktop.org/poppler-0.62.0.tar.xz
URL_MD5 42b801f2defaccb6b6cf1bf783ee1552
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/no_tests.diff
PATCH_COMMAND ${_PopplerPatch_COMMAND}
INSTALL_DIR ${PREFIX_ext_poppler}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_poppler} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBUILD_GTK_TESTS=OFF -DBUILD_QT5_TESTS=FALSE -DBUILD_CPP_TESTS=FALSE -DENABLE_UTILS=FALSE -DENABLE_GLIB=FALSE -DENABLE_LIBOPENJPEG=none
......
diff --git a/cmake/modules/FindIconv.cmake b/cmake/modules/FindIconv.cmake
index 338d17d..5f029b7 100644
--- a/cmake/modules/FindIconv.cmake
+++ b/cmake/modules/FindIconv.cmake
@@ -15,7 +15,7 @@ ENDIF (ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
FIND_PATH(ICONV_INCLUDE_DIR iconv.h)
-FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c)
+FIND_LIBRARY(ICONV_LIBRARIES NO_DEFAULT_PATH PATHS ${CMAKE_INSTALL_PREFIX}/lib /usr/lib NAMES iconv libiconv libiconv-2 )
IF(ICONV_INCLUDE_DIR AND ICONV_LIBRARIES)
SET(ICONV_FOUND TRUE)
......@@ -190,7 +190,10 @@ build_3rdparty () {
ext_gsl \
ext_vc \
ext_libraw \
ext_giflib
ext_giflib \
ext_fontconfig \
ext_freetype \
ext_poppler
# Stop if qmake link was not created
# this meant qt build fail and further builds will
......@@ -280,6 +283,9 @@ rebuild_3rdparty () {
ext_vc \
ext_libraw \
ext_giflib \
ext_fontconfig \
ext_freetype \
ext_poppler \
ext_python \
ext_sip \
ext_pyqt \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment