Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bundle any externally linked libs for osgEarth on Mac
  • Loading branch information
dakcarto committed Apr 15, 2014
1 parent 09e0db6 commit 10f9f55
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion mac/cmake/1osg.cmake.in
Expand Up @@ -47,6 +47,7 @@ IF (OSG_PLUGINS_PATH)
ENDFOREACH (OP)
ENDIF ()


# update lib paths

MESSAGE (STATUS "Updating OSG library paths...")
Expand Down Expand Up @@ -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.