--- CMakeLists.txt.orig 2015-03-15 22:42:14.000000000 +0900
+++ CMakeLists.txt 2015-03-15 22:42:23.000000000 +0900
# http://www.purplekarrot.net/blog/dputCMake.html
- # We start from build/bin/kst2.app, all is build into the final bundle folder
- # On the mac the pathes to needed shared libraries are hardcoded in the binary/library
- # which could be changed by the macro 'fixup_bundle'
- # libs which are hardcoded are resolved automatically
- # but the plugins must be passed as extra argument because they are not hardcoded in the binary
- set(bundle_dir ${kst_build_dir}/bin)
- set(contents_dir ${kst_binary_name}.app/Contents)
- set(app ${bundle_dir}/${kst_binary_name}.app)
- install(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION ${bundle_dir}/${contents_dir}/plugins COMPONENT Runtime)
- "file(GLOB qt_plugins \"${bundle_dir}/${contents_dir}/plugins/imageformats/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
- file(GLOB kst_plugins \"${bundle_dir}/${contents_dir}/plugins/*${CMAKE_SHARED_MODULE_SUFFIX}\")
- set(libs \${qt_plugins} \${kst_plugins})
- include(BundleUtilities)
- fixup_bundle(\"${app}\" \"\${libs}\" \"${dir}\") "
- file(WRITE ${CMAKE_BINARY_DIR}/qt.conf "")
- install(FILES ${CMAKE_BINARY_DIR}/qt.conf DESTINATION ${contents_dir}/Resources COMPONENT Runtime)
- set(CPACK_GENERATOR DragNDrop)