Skip to content
Permalink
Browse files

Bundle any externally linked libs for osgEarth on Mac

  • Loading branch information
dakcarto committed Apr 15, 2014
1 parent 09e0db6 commit 10f9f55886aa7ae4f8c5994f522a0ef02cbc1ab7
Showing with 22 additions and 1 deletion.
  1. +22 −1 mac/cmake/1osg.cmake.in
@@ -47,6 +47,7 @@ IF (OSG_PLUGINS_PATH)
ENDFOREACH (OP)
ENDIF ()


# update lib paths

MESSAGE (STATUS "Updating OSG library paths...")
@@ -78,9 +79,29 @@ FOREACH (OFW ${OSGLIST})
# globe plugin
INSTALLNAMETOOL_CHANGE ("${OFW_CHG}" "${OFW_CHG_TO}" "${QPLUGDIR}/libglobeplugin.so")
ENDFOREACH (OFW)

IF (@HAVE_OSGEARTHQT@)

SET (OSGLIST ${OSGLIST} osgQt osgEarthQt)
ENDIF (@HAVE_OSGEARTHQT@)

# osgEarth exernal libs (2.4+, e.g. tinyxml)
GET_INSTALL_NAME ("${QFWDIR}/osgEarth.framework/osgEarth" "libtinyxml" TINY)
# MESSAGE (STATUS "libtinyxml path: ${TINY}")
IF (EXISTS "${TINY}")
SET (TINY_CHG "${TINY}")
SET (TINY_CHG_TO "${ATEXECUTABLE}/@QGIS_LIB_SUBDIR@/libtinyxml.dylib")
EXECUTE_PROCESS (COMMAND ditto ${QARCHS} "${TINY_CHG}" "${QLIBDIR}/libtinyxml.dylib")

# osg frameworks
FOREACH (OF ${OSGLIST})
INSTALLNAMETOOL_CHANGE ("${TINY_CHG}" "${TINY_CHG_TO}" "${QFWDIR}/${OF}.framework/${OF}")
ENDFOREACH (OF)
# osg plugins
FOREACH (OP ${OSGPLUGLIST})
INSTALLNAMETOOL_CHANGE ("${TINY_CHG}" "${TINY_CHG_TO}" "${QPLUGDIR}/../osgPlugins/${OP}")
ENDFOREACH (OP)
# globe plugin
INSTALLNAMETOOL_CHANGE ("${TINY_CHG}" "${TINY_CHG_TO}" "${QPLUGDIR}/libglobeplugin.so")
ENDIF ()

ENDIF (@OSGEARTH_FOUND@)

0 comments on commit 10f9f55

Please sign in to comment.
You can’t perform that action at this time.