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")