author | unc0rr |
Sat, 02 Apr 2011 21:20:18 +0400 | |
changeset 5086 | df5bd3c32e19 |
parent 5053 | a767954cfa03 |
child 5096 | 7d588baaff82 |
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 |
||
5053 | 10 |
if (APPLE) |
2641 | 11 |
find_package(Qt4 REQUIRED) |
12 |
find_package(SDL REQUIRED) |
|
13 |
find_package(SDL_image REQUIRED) |
|
14 |
find_package(SDL_net REQUIRED) |
|
15 |
find_package(SDL_ttf REQUIRED) |
|
16 |
find_package(SDL_mixer REQUIRED) |
|
17 |
find_package(OGGVORBIS REQUIRED) |
|
4775 | 18 |
if(NOT NOAUTOUPDATE) |
19 |
find_package(SPARKLE) |
|
20 |
if(SPARKLE_FOUND) |
|
21 |
set(SPARKLE_FOUND 1) |
|
22 |
else() |
|
23 |
set(SPARKLE_FOUND 0) |
|
24 |
endif() |
|
25 |
endif() |
|
4335 | 26 |
|
27 |
#use the associated tool from the libraries we've selected |
|
4341 | 28 |
string(REGEX REPLACE "(.*)/include.*" "\\1" qt_base_dir "${QT_INCLUDE_DIR}") |
29 |
find_program(macdeployqt_EXE NAMES macdeployqt macdeployqt-mac PATHS ${qt_base_dir}/bin NO_DEFAULT_PATH) |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
30 |
|
2641 | 31 |
if(NOT macdeployqt_EXE) |
32 |
message(FATAL_ERROR "The utility macdeployqt is required to create the bundle!") |
|
33 |
endif() |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
34 |
|
2641 | 35 |
#dummy target, we're interested in the postscript file |
36 |
add_custom_target(bundle) |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
37 |
|
2641 | 38 |
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
|
39 |
|
2641 | 40 |
set(frameworks_dir ${bundle_name}/Contents/Frameworks/) |
2401 | 41 |
|
2641 | 42 |
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}") |
2547 | 43 |
|
2641 | 44 |
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
|
45 |
|
5053 | 46 |
endif() |