From 5fe025d9415c41661956793d6424b23e5c8aa485 Mon Sep 17 00:00:00 2001 From: Mike Kremer Date: Tue, 7 Dec 2010 12:45:27 +0000 Subject: [PATCH] Adapted fixup_bundle to work in Mac OSX git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@351 fdac6126-5c0c-442c-9429-916003d36597 --- CMakeLists.txt | 2 +- cmake/fixbundle.cmake.in | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f69f9d2f..8abb0266 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,7 +50,7 @@ if (APPLE) COMMAND ${CMAKE_COMMAND} -P "${CMAKE_BINARY_DIR}/fixbundle.cmake" ) # let bundle generation depend on all targets - # add_dependencies (fixbundle OpenFlipper PluginLib ${OPENFLIPPER_PLUGINS}) + add_dependencies (fixbundle QtViewer DecimaterGui) # install bundle install (DIRECTORY ${CMAKE_BINARY_DIR}/Build/OpenMesh.app DESTINATION . diff --git a/cmake/fixbundle.cmake.in b/cmake/fixbundle.cmake.in index c4b7603f..8f73938b 100644 --- a/cmake/fixbundle.cmake.in +++ b/cmake/fixbundle.cmake.in @@ -47,9 +47,16 @@ foreach (_qtp ${_qtplugins}) list(APPEND _qtdirs "${_dir}") endforeach () +# Get library paths +get_filename_component(_GlutDir "@GLUT_glut_LIBRARY@" PATH) +get_filename_component(_GlewDir "@GLEW_LIBRARY@" PATH) + # fix all dependencies -fixup_bundle (@CMAKE_BINARY_DIR@/Build/OpenFlipper.app "${_plugins};${_qtplugins}" "/usr/lib;${_qtdirs}") +fixup_bundle ("@CMAKE_BINARY_DIR@/Build/OpenMesh.app" "" "${_GlutDir};${_GlewDir}") + +# fix all dependencies +fixup_bundle (@CMAKE_BINARY_DIR@/Build/OpenMesh.app "${_qtplugins}" "/usr/lib;${_qtdirs}") # create qt plugin configuration file -file(WRITE "@CMAKE_BINARY_DIR@/Build/OpenFlipper.app/Contents/Resources/qt.conf" "[Paths]\nPlugins = Resources/QtPlugins") +file(WRITE "@CMAKE_BINARY_DIR@/Build/OpenMesh.app/Contents/Resources/qt.conf" "[Paths]\nPlugins = Resources/QtPlugins")