author | unc0rr |
Sun, 09 Jan 2011 21:36:51 +0300 | |
changeset 4825 | e8539e429ae3 |
parent 4341 | 46b8791e577f |
child 4775 | 663aa9552bfc |
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) |
|
4335 | 20 |
|
21 |
#use the associated tool from the libraries we've selected |
|
4341 | 22 |
string(REGEX REPLACE "(.*)/include.*" "\\1" qt_base_dir "${QT_INCLUDE_DIR}") |
23 |
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
|
24 |
|
2641 | 25 |
if(NOT macdeployqt_EXE) |
26 |
message(FATAL_ERROR "The utility macdeployqt is required to create the bundle!") |
|
27 |
endif() |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
28 |
|
2641 | 29 |
#dummy target, we're interested in the postscript file |
30 |
add_custom_target(bundle) |
|
2219
07f5345ecae7
additional variable (BUNDLE) to make a standalone Mac application
koda
parents:
diff
changeset
|
31 |
|
2641 | 32 |
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
|
33 |
|
2641 | 34 |
set(frameworks_dir ${bundle_name}/Contents/Frameworks/) |
2401 | 35 |
|
2641 | 36 |
string(REGEX REPLACE "(.*);-.*" "\\1" sdl_dir "${SDL_LIBRARY}") |
2547 | 37 |
|
2641 | 38 |
if(SPARKLE_FOUND) |
39 |
set(SPARKLE_FOUND 1) |
|
40 |
else() |
|
41 |
set(SPARKLE_FOUND 0) |
|
42 |
endif() |
|
43 |
||
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 |
|
2401 | 46 |
endif(APPLE AND BUNDLE) |