diff options
Diffstat (limited to 'linden/indra/newview/packaging/mac/GenerateInfoPlist.cmake')
-rw-r--r-- | linden/indra/newview/packaging/mac/GenerateInfoPlist.cmake | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/linden/indra/newview/packaging/mac/GenerateInfoPlist.cmake b/linden/indra/newview/packaging/mac/GenerateInfoPlist.cmake new file mode 100644 index 0000000..ecbec34 --- /dev/null +++ b/linden/indra/newview/packaging/mac/GenerateInfoPlist.cmake | |||
@@ -0,0 +1,39 @@ | |||
1 | # | ||
2 | # Generate the Info.plist file from the template. | ||
3 | # Only @-style "@VARIABLES@" are substituted in the template (not "${VARIABLES}"). | ||
4 | # | ||
5 | # This script is needed because CMake has no other way to perform | ||
6 | # configure_file() as a build-time custom command. :( | ||
7 | # | ||
8 | # When running this script, you must define (-D) SOURCE_DIR and | ||
9 | # BINARY_DIR to refer to indra and the build directory respectively. | ||
10 | # (Equivalent to CMAKE_SOURCE_DIR and CMAKE_BINARY_DIR in | ||
11 | # CMakeLists.txt ) | ||
12 | # | ||
13 | |||
14 | if (NOT SOURCE_DIR) | ||
15 | message( FATAL_ERROR "You forgot to define SOURCE_DIR!" ) | ||
16 | endif (NOT SOURCE_DIR) | ||
17 | |||
18 | if (NOT BINARY_DIR) | ||
19 | message( FATAL_ERROR "You forgot to define BINARY_DIR!" ) | ||
20 | endif (NOT BINARY_DIR) | ||
21 | |||
22 | set(SCRIPTS_DIR "${SOURCE_DIR}/../scripts") | ||
23 | set(CMAKE_MODULE_PATH "${SOURCE_DIR}/cmake/" "${CMAKE_ROOT/Modules}") | ||
24 | |||
25 | include(BuildVersion) | ||
26 | build_version(viewer) | ||
27 | |||
28 | SET( BUNDLE_NAME "${viewer_NAME}" ) | ||
29 | SET( EXECUTABLE "${viewer_NAME}" ) | ||
30 | set( BUNDLE_VERSION "${viewer_VERSION}" ) | ||
31 | set( SHORT_VERSION_STRING "${viewer_NAME} ${viewer_VERSION}" ) | ||
32 | set( ICON_FILE "viewer.icns" ) | ||
33 | set( IDENTIFIER "${viewer_BUNDLE_ID}" ) | ||
34 | set( SIGNATURE "impr" ) | ||
35 | |||
36 | configure_file( | ||
37 | ${SOURCE_DIR}/newview/packaging/mac/Info.plist.in | ||
38 | ${BINARY_DIR}/newview/packaging/mac/Info.plist | ||
39 | @ONLY) | ||