author | nemo |
Mon, 16 Nov 2009 17:40:17 +0000 | |
changeset 2626 | cb64997c7c59 |
parent 2593 | dd995a9c8871 |
child 2641 | b08cafb86797 |
permissions | -rw-r--r-- |
2593 | 1 |
if (NOT APPLE) |
2 |
CONFIGURE_FILE( |
|
3 |
"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" |
|
4 |
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" |
|
5 |
IMMEDIATE @ONLY) |
|
6 |
||
7 |
ADD_CUSTOM_TARGET(uninstall |
|
8 |
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") |
|
9 |
endif() |
|
10 |
||
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
11 |
if (APPLE AND BUNDLE) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
12 |
|
2547 | 13 |
find_package(OGGVORBIS REQUIRED) |
2550 | 14 |
find_package(SPARKLE) |
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
15 |
find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
16 |
|
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
17 |
if(NOT macdeployqt_EXE) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
18 |
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
|
19 |
endif() |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
20 |
|
2220 | 21 |
#dummy target, we're interested in the postscript |
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
22 |
add_custom_target(bundle) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
23 |
|
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
24 |
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
|
25 |
|
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
26 |
set(frameworks_dir ${bundle_name}/Contents/Frameworks/) |
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
27 |
|
2401 | 28 |
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}") |
29 |
||
2547 | 30 |
if(SPARKLE_FOUND) |
31 |
set(SPARKLE_FOUND 1) |
|
32 |
else() |
|
33 |
set(SPARKLE_FOUND 0) |
|
34 |
endif() |
|
35 |
||
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
36 |
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
|
37 |
|
2401 | 38 |
endif(APPLE AND BUNDLE) |