author | koda |
Mon, 26 Oct 2009 10:39:20 +0000 | |
changeset 2591 | c6597b65caea |
parent 2550 | 3f84392522cf |
child 2593 | dd995a9c8871 |
permissions | -rw-r--r-- |
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
1 |
if (APPLE AND BUNDLE) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
2 |
|
2547 | 3 |
find_package(OGGVORBIS REQUIRED) |
2550 | 4 |
find_package(SPARKLE) |
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
5 |
find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
6 |
|
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
7 |
if(NOT macdeployqt_EXE) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
8 |
message(FATAL_ERROR "The utility macdeployqt is required to create the bundle!") |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
9 |
endif() |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
10 |
|
2220 | 11 |
#dummy target, we're interested in the postscript |
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
12 |
add_custom_target(bundle) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
13 |
|
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
14 |
set_target_properties(bundle PROPERTIES POST_INSTALL_SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
15 |
|
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
16 |
set(frameworks_dir ${bundle_name}/Contents/Frameworks/) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
17 |
|
2401 | 18 |
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}") |
19 |
||
2547 | 20 |
if(SPARKLE_FOUND) |
21 |
set(SPARKLE_FOUND 1) |
|
22 |
else() |
|
23 |
set(SPARKLE_FOUND 0) |
|
24 |
endif() |
|
25 |
||
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
26 |
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/CreateMacBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/CreateMacBundle.cmake) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
27 |
|
2401 | 28 |
endif(APPLE AND BUNDLE) |