author | Wuzzy <Wuzzy2@mail.ru> |
Mon, 30 Jul 2018 19:23:28 +0200 | |
changeset 13574 | 9c83afd65e8c |
parent 12888 | 41d147eb26ea |
permissions | -rw-r--r-- |
11611 | 1 |
# check for a well known-framework |
2 |
execute_process(COMMAND stat ${frameworks_dir}/QtCore.framework RESULT_VARIABLE doBundle OUTPUT_QUIET ERROR_QUIET) |
|
3 |
# prepare Frameworks directory |
|
8317
ec9f94ab2737
remove the CROSSAPPLE option until a better solution is found
koda
parents:
8316
diff
changeset
|
4 |
execute_process(COMMAND mkdir -p ${frameworks_dir}) |
7816 | 5 |
# macdeployqt will convert safely any absolute path library for 'hedgewars' |
8316
89232b2fa1d6
cmake rework, cleanup a lot of redundant sections, separate library and binary install location, unify osx and win handling of the data directory (tested on win, lin and mac)
koda
parents:
7817
diff
changeset
|
6 |
execute_process(COMMAND ${macdeployqt_executable} ${CMAKE_BINARY_DIR}/Hedgewars.app OUTPUT_QUIET ERROR_QUIET) |
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:
7816
diff
changeset
|
7 |
|
12888
41d147eb26ea
Apply horrible workaround to build relocatable executables
koda
parents:
12887
diff
changeset
|
8 |
# but macdeployqt will not work for a second executable, so employ this series of ridiculous commands to work around it |
41d147eb26ea
Apply horrible workaround to build relocatable executables
koda
parents:
12887
diff
changeset
|
9 |
execute_process(COMMAND mv ${CMAKE_BINARY_DIR}/Hedgewars.app/Contents/MacOS/hedgewars ${CMAKE_BINARY_DIR}/Hedgewars.app/Contents/MacOS/tmp) |
41d147eb26ea
Apply horrible workaround to build relocatable executables
koda
parents:
12887
diff
changeset
|
10 |
execute_process(COMMAND mv ${CMAKE_BINARY_DIR}/Hedgewars.app/Contents/MacOS/hwengine ${CMAKE_BINARY_DIR}/Hedgewars.app/Contents/MacOS/hedgewars) |
41d147eb26ea
Apply horrible workaround to build relocatable executables
koda
parents:
12887
diff
changeset
|
11 |
execute_process(COMMAND ${macdeployqt_executable} ${CMAKE_BINARY_DIR}/Hedgewars.app OUTPUT_QUIET ERROR_QUIET) |
41d147eb26ea
Apply horrible workaround to build relocatable executables
koda
parents:
12887
diff
changeset
|
12 |
execute_process(COMMAND mv ${CMAKE_BINARY_DIR}/Hedgewars.app/Contents/MacOS/hedgewars ${CMAKE_BINARY_DIR}/Hedgewars.app/Contents/MacOS/hwengine) |
41d147eb26ea
Apply horrible workaround to build relocatable executables
koda
parents:
12887
diff
changeset
|
13 |
execute_process(COMMAND mv ${CMAKE_BINARY_DIR}/Hedgewars.app/Contents/MacOS/tmp ${CMAKE_BINARY_DIR}/Hedgewars.app/Contents/MacOS/hedgewars) |
5053 | 14 |
|
12888
41d147eb26ea
Apply horrible workaround to build relocatable executables
koda
parents:
12887
diff
changeset
|
15 |
if(doBundle EQUAL 1) |
5053 | 16 |
if(${SPARKLE_FOUND}) |
9851 | 17 |
execute_process(COMMAND cp -pPR ${SPARKLE_LIBRARY} ${frameworks_dir}) |
5053 | 18 |
endif() |
9345
bb9bf1efd0d2
use the modern install(SCRIPT ...) command instead of legacy POST_BUILD_SCRIPT
koda
parents:
9050
diff
changeset
|
19 |
message(STATUS "Frameworks and libraries successfully copied...") |
5053 | 20 |
else() |
9345
bb9bf1efd0d2
use the modern install(SCRIPT ...) command instead of legacy POST_BUILD_SCRIPT
koda
parents:
9050
diff
changeset
|
21 |
message(STATUS "Frameworks already present, skipping...") |
2401 | 22 |
endif() |