|
@@ -25,20 +25,32 @@ add_subdirectory (test)
|
25
|
25
|
|
26
|
26
|
#################################################################
|
27
|
27
|
|
28
|
|
-# Preparing the bundle on install
|
29
|
|
-# http://www.cmake.org/Wiki/BundleUtilitiesExample
|
30
|
|
-# Why does it even work? O.o
|
31
|
28
|
if (APPLE)
|
|
29
|
+ # Preparing the bundle on install
|
|
30
|
+ # http://www.cmake.org/Wiki/BundleUtilitiesExample
|
32
|
31
|
set (plugin_dest_dir OpenRaider.app/Contents/MacOS)
|
33
|
32
|
set (APPS "${PROJECT_BINARY_DIR}/src/OpenRaider.app")
|
34
|
|
- set (DIRS ${QT_LIBRARY_DIRS})
|
35
|
33
|
install (CODE "
|
36
|
34
|
file(GLOB_RECURSE PLUGINS
|
37
|
35
|
\"\${CMAKE_INSTALL_PREFIX}/${plugin_dest_dir}/plugins/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
|
38
|
36
|
include(BundleUtilities)
|
39
|
|
- fixup_bundle(\"${APPS}\" \"\${PLUGINS}\" \"${DIRS}\")
|
|
37
|
+ fixup_bundle(\"${APPS}\" \"\${PLUGINS}\" \"\")
|
40
|
38
|
" COMPONENT Runtime
|
41
|
39
|
)
|
|
40
|
+
|
|
41
|
+ # Copy setup script
|
|
42
|
+ install (PROGRAMS ${PROJECT_SOURCE_DIR}/cmake/setup_mac.sh
|
|
43
|
+ DESTINATION ${PROJECT_BINARY_DIR}/src/OpenRaider.app/Contents/MacOS
|
|
44
|
+ RENAME OpenRaider.sh
|
|
45
|
+ )
|
|
46
|
+
|
|
47
|
+ # Fix executable name, so setup script will be called
|
|
48
|
+ install (CODE "
|
|
49
|
+ execute_process (
|
|
50
|
+ COMMAND /usr/libexec/PlistBuddy -c \"Set :CFBundleExecutable OpenRaider.sh\" Info.plist
|
|
51
|
+ WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/src/OpenRaider.app/Contents
|
|
52
|
+ )
|
|
53
|
+ " COMPONENT Runtime)
|
42
|
54
|
endif (APPLE)
|
43
|
55
|
|
44
|
56
|
#################################################################
|