author | Tobias Neumann <mail@tobias-neumann.eu> |
Sat, 30 Oct 2010 20:01:34 +0200 | |
changeset 4021 | 014325c23705 |
parent 2641 | b08cafb86797 |
child 4335 | c279aeb615df |
permissions | -rw-r--r-- |
2593 | 1 |
if (NOT APPLE) |
2641 | 2 |
CONFIGURE_FILE( |
3 |
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" |
|
4 |
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" |
|
5 |
IMMEDIATE @ONLY) |
|
2593 | 6 |
|
2641 | 7 |
ADD_CUSTOM_TARGET(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") |
2593 | 8 |
endif() |
9 |
||
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
10 |
if (APPLE AND BUNDLE) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
11 |
|
2641 | 12 |
find_package(Qt4 REQUIRED) |
13 |
find_package(SDL REQUIRED) |
|
14 |
find_package(SDL_image REQUIRED) |
|
15 |
find_package(SDL_net REQUIRED) |
|
16 |
find_package(SDL_ttf REQUIRED) |
|
17 |
find_package(SDL_mixer REQUIRED) |
|
18 |
find_package(OGGVORBIS REQUIRED) |
|
19 |
find_package(SPARKLE) |
|
20 |
find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac) |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
21 |
|
2641 | 22 |
if(NOT macdeployqt_EXE) |
23 |
message(FATAL_ERROR "The utility macdeployqt is required to create the bundle!") |
|
24 |
endif() |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
25 |
|
2641 | 26 |
#dummy target, we're interested in the postscript file |
27 |
add_custom_target(bundle) |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
28 |
|
2641 | 29 |
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
|
30 |
|
2641 | 31 |
set(frameworks_dir ${bundle_name}/Contents/Frameworks/) |
2401 | 32 |
|
2641 | 33 |
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}") |
2547 | 34 |
|
2641 | 35 |
if(SPARKLE_FOUND) |
36 |
set(SPARKLE_FOUND 1) |
|
37 |
else() |
|
38 |
set(SPARKLE_FOUND 0) |
|
39 |
endif() |
|
40 |
||
41 |
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake) |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
42 |
|
2401 | 43 |
endif(APPLE AND BUNDLE) |