From 9a3f014decde2824ab53b96c65ddf3e4150c8c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Mon, 22 Aug 2011 06:15:33 +0000 Subject: [PATCH] Fix build for lib only without apps. Still todo is to fix the whole build with apps. git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@400 fdac6126-5c0c-442c-9429-916003d36597 --- cmake/fixbundle.cmake.in | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/cmake/fixbundle.cmake.in b/cmake/fixbundle.cmake.in index bd208200..1bfca2d0 100644 --- a/cmake/fixbundle.cmake.in +++ b/cmake/fixbundle.cmake.in @@ -39,19 +39,24 @@ endfunction(gp_item_default_embedded_path_override) include (BundleUtilities) -# copy qt plugins to bundle -file (GLOB _plugins "@CMAKE_BINARY_DIR@/Build/OpenFlipper.app/Contents/Resources/Plugins/*.so") -file (GLOB_RECURSE _qtplugins "@QT_PLUGINS_DIR@/*.bundle") -foreach (_qtp ${_qtplugins}) - get_filename_component(_dir "${_qtp}" PATH) - list(APPEND _qtdirs "${_dir}") -endforeach () +if ( @BUILD_APPS@ ) + message("Fixing up bundle ...") -# Get library paths -get_filename_component(_GlutDir "@GLUT_glut_LIBRARY@" PATH) + # copy qt plugins to bundle + file (GLOB _plugins "@CMAKE_BINARY_DIR@/Build/OpenFlipper.app/Contents/Resources/Plugins/*.so") + file (GLOB_RECURSE _qtplugins "@QT_PLUGINS_DIR@/*.bundle") + foreach (_qtp ${_qtplugins}) + get_filename_component(_dir "${_qtp}" PATH) + list(APPEND _qtdirs "${_dir}") + endforeach () -# fix all dependencies -fixup_bundle (@CMAKE_BINARY_DIR@/Build/bin/QtViewer "${_qtplugins}" "/usr/lib;${_qtdirs};${_GlutDir}") + # Get library paths + get_filename_component(_GlutDir "@GLUT_glut_LIBRARY@" PATH) + + # fix all dependencies + fixup_bundle (@CMAKE_BINARY_DIR@/Build/bin/QtViewer "${_qtplugins}" "/usr/lib;${_qtdirs};${_GlutDir}") + +endif() # create qt plugin configuration file # file(WRITE "@CMAKE_BINARY_DIR@/Build/OpenMesh.app/Contents/Resources/qt.conf" "[Paths]\nPlugins = Resources/QtPlugins")