author | Xeli |
Sat, 03 Dec 2011 19:18:13 +0100 | |
changeset 6488 | c356ddebab84 |
parent 6089 | adc69bbb24e5 |
child 7112 | 38c5d56c4d6e |
permissions | -rw-r--r-- |
2593 | 1 |
if (NOT APPLE) |
5169 | 2 |
configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" |
3 |
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" |
|
4 |
IMMEDIATE @ONLY) |
|
2593 | 5 |
|
5169 | 6 |
add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") |
2593 | 7 |
endif() |
8 |
||
5053 | 9 |
if (APPLE) |
2641 | 10 |
find_package(Qt4 REQUIRED) |
11 |
find_package(SDL REQUIRED) |
|
12 |
find_package(SDL_image REQUIRED) |
|
13 |
find_package(SDL_net REQUIRED) |
|
14 |
find_package(SDL_ttf REQUIRED) |
|
15 |
find_package(SDL_mixer REQUIRED) |
|
16 |
find_package(OGGVORBIS REQUIRED) |
|
4775 | 17 |
if(NOT NOAUTOUPDATE) |
5169 | 18 |
#needed for SPARKLE_FOUND variable |
19 |
find_package(Sparkle QUIET) |
|
5188 | 20 |
#needed because the 'if' clause in the script prints silly policy warnings |
21 |
if(${SPARKLE_FOUND}) |
|
22 |
set(SPARKLE_FOUND 1) |
|
23 |
else() |
|
24 |
set(SPARKLE_FOUND 0) |
|
25 |
endif() |
|
4775 | 26 |
endif() |
4335 | 27 |
|
28 |
#use the associated tool from the libraries we've selected |
|
4341 | 29 |
string(REGEX REPLACE "(.*)/include.*" "\\1" qt_base_dir "${QT_INCLUDE_DIR}") |
5169 | 30 |
|
31 |
#remove the ";-framework Cocoa" from the SDL_LIBRARY variable |
|
32 |
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}") |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
33 |
|
5096 | 34 |
#this tool is present in qt 4.5 but only if you compile from sources; from qt 4.6 is present also in the binary version |
6089 | 35 |
find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac PATHS ${qt_base_dir}/bin) |
2641 | 36 |
if(NOT macdeployqt_EXE) |
6089 | 37 |
message(FATAL_ERROR "The utility macdeployqt is required to create the bundle (seached: ${qt_base_dir})") |
38 |
else() |
|
39 |
message(STATUS "macdeployqt found in ${macdeployqt_EXE}") |
|
2641 | 40 |
endif() |
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
41 |
|
2641 | 42 |
#dummy target, we're interested in the postscript file |
43 |
add_custom_target(bundle) |
|
44 |
set_target_properties(bundle PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake) |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
45 |
|
5169 | 46 |
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake) |
47 |
endif() |
|
2547 | 48 |