|
@@ -110,5 +110,17 @@ set (LIBS ${LIBS} ${ZLIB_LIBRARIES})
|
110
|
110
|
# Link to all found libs
|
111
|
111
|
target_link_libraries (OpenRaider ${LIBS})
|
112
|
112
|
|
113
|
|
-# Add the install targets
|
114
|
|
-install (TARGETS OpenRaider DESTINATION bin)
|
|
113
|
+# Preparing the bundle on install
|
|
114
|
+# http://www.cmake.org/Wiki/BundleUtilitiesExample
|
|
115
|
+if (APPLE)
|
|
116
|
+ set (plugin_dest_dir OpenRaider.app/Contents/MacOS)
|
|
117
|
+ set (APPS "${PROJECT_BINARY_DIR}/OpenRaider.app")
|
|
118
|
+ set (DIRS ${QT_LIBRARY_DIRS})
|
|
119
|
+ install (CODE "
|
|
120
|
+ file(GLOB_RECURSE PLUGINS
|
|
121
|
+ \"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
|
|
122
|
+ include(BundleUtilities)
|
|
123
|
+ fixup_bundle(\"${APPS}\" \"\${PLUGINS}\" \"${DIRS}\")
|
|
124
|
+ " COMPONENT Runtime
|
|
125
|
+ )
|
|
126
|
+endif (APPLE)
|