Skip to content
Permalink
Browse files
libpq may link libintl
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@15011 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
kyngchaos committed Jan 9, 2011
1 parent e954c46 commit 9aa358ded2641bbb49a1dc40a245a6792710b925
Showing with 16 additions and 5 deletions.
  1. +5 −4 cmake/MacBundleMacros.cmake
  2. +11 −1 mac/cmake/2lib.cmake.in
@@ -10,13 +10,14 @@
# regex stuff taken from GetPrerequisites

FUNCTION (GET_INSTALL_NAME LIBFILE LIBNAME OUTVAR)
EXECUTE_PROCESS (COMMAND otool -D "${LIBFILE}" OUTPUT_VARIABLE iname_out)
EXECUTE_PROCESS (COMMAND otool -L "${LIBFILE}" OUTPUT_VARIABLE iname_out)
# remove 1st line, it's just path to lib file
STRING (REGEX REPLACE ".*:\n" "" iname "${iname_out}")
IF (iname)
# trim it
STRING (REGEX MATCH "[^\n ].*[^\n ]" iname "${iname}")
SET (${OUTVAR} ${iname} PARENT_SCOPE)
# find libname
STRING (REGEX MATCH "[^\n\t ]*${LIBNAME}[^\n ]*" iname "${iname}")
ENDIF (iname)
SET (${OUTVAR} ${iname} PARENT_SCOPE)
ENDFUNCTION (GET_INSTALL_NAME)

# message only if verbose makefiles
@@ -97,6 +97,17 @@ IF (@POSTGRES_LIBRARY@ MATCHES ".*libpq.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "@POSTGRES_LIBRARY@" "${QLIBDIR}/libpq.dylib")
GET_INSTALL_NAME ("@POSTGRES_LIBRARY@" "libpq" PQLIB)
UPDATEQGISPATHS (${PQLIB} libpq.dylib)
# may have been built with libintl
GET_INSTALL_NAME ("@POSTGRES_LIBRARY@" "libintl" INTLLIB)
IF (INTLLIB)
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "${INTLLIB}" "${QLIBDIR}/libintl.dylib")
SET (LIB_CHG_TO "${ATEXECUTABLE}/@QGIS_LIB_SUBDIR@/libintl.dylib")
IF (@OSX_HAVE_LOADERPATH@)
SET (LIB_CHG_TO "${ATLOADER}/libintl.dylib")
ENDIF (@OSX_HAVE_LOADERPATH@)
MESSAGE(STATUS "INSTALLNAMETOOL_CHANGE (${INTLLIB} ${LIB_CHG_TO} ${QLIBDIR}/libpq.dylib")
INSTALLNAMETOOL_CHANGE (${INTLLIB} ${LIB_CHG_TO} "${QLIBDIR}/libpq.dylib")
ENDIF (INTLLIB)
ENDIF ()

# libfcgi (non-system)
@@ -108,4 +119,3 @@ IF (@FCGI_LIBRARY@ MATCHES ".*libfcgi.dylib" AND NOT @FCGI_LIBRARY@ MATCHES "/us
GET_INSTALL_NAME ("@FCGI_LIBRARY@" "libfcgi" FCGILIB)
UPDATEQGISPATHS (${FCGILIB} libfcgi.dylib)
ENDIF ()

0 comments on commit 9aa358d

Please sign in to comment.