author | alfadur |
Tue, 10 May 2022 00:19:52 +0300 | |
changeset 15868 | 78745063cf33 |
parent 15577 | 107170c05bac |
permissions | -rw-r--r-- |
9963 | 1 |
if(NOT APPLE) |
7817
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
2 |
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" |
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
3 |
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" |
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
4 |
IMMEDIATE @ONLY) |
2593 | 5 |
|
7817
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
6 |
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") |
2593 | 7 |
endif() |
8 |
||
10976 | 9 |
if(APPLE AND NOT SKIPBUNDLE) |
13338
0b12b0d0d12c
Fix outdated Qt CMake dependency for OS X
Wuzzy <Wuzzy2@mail.ru>
parents:
12386
diff
changeset
|
10 |
find_package(Qt5 REQUIRED QUIET COMPONENTS Core Widgets Gui Network) |
15577
107170c05bac
Add patch to correctly handle libsdl2 from system/cmake
LocutusOfBorg
parents:
15355
diff
changeset
|
11 |
find_package(SDL2 REQUIRED CONFIG) |
12386 | 12 |
find_package(SDL2_image 2 REQUIRED) |
13 |
find_package(SDL2_net 2 REQUIRED) |
|
14 |
find_package(SDL2_ttf 2 REQUIRED) |
|
15 |
find_package(SDL2_mixer 2 REQUIRED) |
|
11610 | 16 |
find_package(OggVorbis REQUIRED) |
10975
47c3a00f8037
Make sure that the png library name is always defined
koda
parents:
10974
diff
changeset
|
17 |
find_package(PNG REQUIRED) |
9679
dfaa39674e1e
some improvements for sdl2 building (not complete nor clean)
koda
parents:
9347
diff
changeset
|
18 |
|
7817
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
19 |
if(NOT NOAUTOUPDATE) |
8659 | 20 |
find_package(Sparkle) #needed for SPARKLE_FOUND variable |
7817
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
21 |
#needed because the 'if' clause in the script prints silly policy warnings |
9961 | 22 |
if(SPARKLE_FOUND) |
7817
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
23 |
set(SPARKLE_FOUND 1) |
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
24 |
else() |
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
25 |
set(SPARKLE_FOUND 0) |
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
26 |
endif() |
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
27 |
endif() |
6cc558a69b58
countless small optimisation for cmake, output messages are now coherent (mostly) and the options get fully respected (eg. skipping library search if not activated)
koda
parents:
7112
diff
changeset
|
28 |
|
15577
107170c05bac
Add patch to correctly handle libsdl2 from system/cmake
LocutusOfBorg
parents:
15355
diff
changeset
|
29 |
#remove the ";-framework Cocoa" from the SDL2_LIBRARIES variable |
107170c05bac
Add patch to correctly handle libsdl2 from system/cmake
LocutusOfBorg
parents:
15355
diff
changeset
|
30 |
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_library_only "${SDL2_LIBRARIES}") |
107170c05bac
Add patch to correctly handle libsdl2 from system/cmake
LocutusOfBorg
parents:
15355
diff
changeset
|
31 |
#remove the "libSDLmain.a" from the SDL2_LIBRARIES variable |
10974
0f9fc5923be4
Fix libsdl bundling on OSX when library rather than framework is used
koda
parents:
10382
diff
changeset
|
32 |
string(REGEX REPLACE ".*;(.*)" "\\1" sdl_library_only "${sdl_library_only}") |
5169 | 33 |
|
10975
47c3a00f8037
Make sure that the png library name is always defined
koda
parents:
10974
diff
changeset
|
34 |
#get the neme of the library (harmelss if it is static) |
47c3a00f8037
Make sure that the png library name is always defined
koda
parents:
10974
diff
changeset
|
35 |
string(REGEX REPLACE ".*/(.*)$" "\\1" PNG_LIBNAME "${PNG_LIBRARY}") |
47c3a00f8037
Make sure that the png library name is always defined
koda
parents:
10974
diff
changeset
|
36 |
string(REGEX REPLACE ".*/(.*)$" "\\1" ZLIB_LIBNAME "${ZLIB_LIBRARY}") |
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
37 |
|
8317
ec9f94ab2737
remove the CROSSAPPLE option until a better solution is found
koda
parents:
8316
diff
changeset
|
38 |
set(frameworks_dir ${CMAKE_INSTALL_PREFIX}/${target_library_install_dir}) |
15334
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
39 |
|
8322 | 40 |
if(${BUILD_ENGINE_LIBRARY}) |
41 |
set(engine_full_path "${frameworks_dir}/${CMAKE_SHARED_LIBRARY_PREFIX}hwengine${CMAKE_SHARED_LIBRARY_SUFFIX}") |
|
42 |
else() |
|
43 |
set(engine_full_path "${CMAKE_INSTALL_PREFIX}/hwengine${CMAKE_EXECUTABLE_SUFFIX}") |
|
44 |
endif() |
|
8317
ec9f94ab2737
remove the CROSSAPPLE option until a better solution is found
koda
parents:
8316
diff
changeset
|
45 |
|
15334
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
46 |
|
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
47 |
#create the .app bundle using BundleUtilities instead of old macdeployqt |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
48 |
set(APP_DIR "Hedgewars.app") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
49 |
set(APP_BASE_DIR "${CMAKE_INSTALL_PREFIX}/../") # should be, Hedgewars.app/Contents/MacOS/../ |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
50 |
|
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
51 |
# macro to install qt5 plugins |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
52 |
# modified from https://github.com/Kitware/CMake/blob/master/Source/QtDialog/CMakeLists.txt |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
53 |
macro(install_qt5_plugin _qt_plugin_name _qt_plugins_var) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
54 |
get_target_property(_qt_plugin_path "${_qt_plugin_name}" LOCATION) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
55 |
if(EXISTS "${_qt_plugin_path}") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
56 |
get_filename_component(_qt_plugin_file "${_qt_plugin_path}" NAME) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
57 |
get_filename_component(_qt_plugin_type "${_qt_plugin_path}" PATH) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
58 |
get_filename_component(_qt_plugin_type "${_qt_plugin_type}" NAME) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
59 |
set(_qt_plugin_dir "PlugIns") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
60 |
set(_qt_plugin_dest "${_qt_plugin_dir}/${_qt_plugin_type}") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
61 |
install(FILES "${_qt_plugin_path}" |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
62 |
DESTINATION "../${_qt_plugin_dest}" # relative to install dir |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
63 |
${COMPONENT}) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
64 |
list(APPEND ${_qt_plugins_var} |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
65 |
"\${CMAKE_BINARY_DIR}/${APP_BASE_DIR}/${_qt_plugin_dest}/${_qt_plugin_file}") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
66 |
else() |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
67 |
message(FATAL_ERROR "QT plugin ${_qt_plugin_name} not found") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
68 |
endif() |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
69 |
endmacro() |
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
70 |
|
15334
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
71 |
# install cocoa plugin and build list to send to fixup_bundle |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
72 |
install_qt5_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
73 |
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
74 |
"[Paths]\nPlugins = ${_qt_plugin_dir}\n") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
75 |
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/qt.conf" |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
76 |
DESTINATION "../Resources" # relative to install dir |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
77 |
${COMPONENT}) |
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
78 |
|
15334
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
79 |
# Build up search directories for fixup_bundle |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
80 |
set(DIRS "") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
81 |
# Add QT bin and lib paths |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
82 |
if(CMAKE_PREFIX_PATH) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
83 |
foreach(dir ${CMAKE_PREFIX_PATH}) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
84 |
list(APPEND DIRS "${dir}/bin" "${dir}/lib") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
85 |
endforeach() |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
86 |
endif() |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
87 |
# Add other lib folder from around the system |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
88 |
list(APPEND DIRS |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
89 |
~/Library/Frameworks |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
90 |
/Library/Frameworks |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
91 |
/usr/local/lib |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
92 |
/opt/local/lib |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
93 |
) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
94 |
|
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
95 |
# operate on the Hedgewars.app |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
96 |
set(APPS ${CMAKE_BINARY_DIR}/${APP_DIR}) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
97 |
|
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
98 |
# debugging |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
99 |
message(STATUS "APPS: ${APPS}") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
100 |
message(STATUS "QT_PLUGINS: ${QT_PLUGINS}") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
101 |
message(STATUS "DIRS: ${DIRS}") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
102 |
|
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
103 |
# properly fixup the .app to include all dependencies |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
104 |
install(CODE "include(BundleUtilities) |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
105 |
fixup_bundle(\"${APPS}\" \"${QT_PLUGINS}\" \"${DIRS}\")") |
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
106 |
|
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
107 |
|
9347 | 108 |
#create the .dmg for deployment |
109 |
#first make sure .app exists, then remove any old .dmg with same name, finally run the script |
|
11271 | 110 |
add_custom_target(dmg COMMAND make install |
9347 | 111 |
COMMAND rm -f ${CMAKE_BINARY_DIR}/Hedgewars-${HEDGEWARS_VERSION}.dmg |
112 |
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/create-dmg.sh |
|
113 |
--volname "Hedgewars ${HEDGEWARS_VERSION}" |
|
114 |
# --volicon icon.icns |
|
115 |
--window-size 600 470 |
|
116 |
--icon-size 96 |
|
117 |
--icon "Hedgewars" 190 190 |
|
118 |
--app-drop-link 410 190 |
|
119 |
--background "${CMAKE_CURRENT_SOURCE_DIR}/../misc/dmgBackground.png" |
|
120 |
${CMAKE_BINARY_DIR}/Hedgewars-${HEDGEWARS_VERSION}.dmg |
|
15334
7e3bd4030aa5
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
raptor <buckyballreaction@gmail.com>
parents:
14944
diff
changeset
|
121 |
${CMAKE_BINARY_DIR}/${APP_DIR} |
9347 | 122 |
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) |
5169 | 123 |
endif() |
2547 | 124 |