author | unc0rr |
Thu, 22 Nov 2012 00:56:36 +0400 | |
changeset 8091 | e0a76056a633 |
parent 8090 | 38d9cc60b14c |
child 8093 | 2286a39140da |
permissions | -rw-r--r-- |
184 | 1 |
add_subdirectory(hedgewars) |
2641 | 2 |
|
7256 | 3 |
IF(APPLE OR CROSSAPPLE) |
4336 | 4 |
#needed for CFBundleVersion and CFBundleShortVersionString |
5 |
FIND_PROGRAM(HGCOMMAND hg) |
|
6 |
IF (HGCOMMAND AND (EXISTS ${hedgewars_SOURCE_DIR}/.hg)) |
|
8090
38d9cc60b14c
cleanup revision section, make hg launch tolerant to config errors, drop deprecated exec_prog for desktop configuration in favour of execute_process
koda
parents:
7256
diff
changeset
|
7 |
execute_process(COMMAND ${HGCOMMAND} identify -in |
38d9cc60b14c
cleanup revision section, make hg launch tolerant to config errors, drop deprecated exec_prog for desktop configuration in favour of execute_process
koda
parents:
7256
diff
changeset
|
8 |
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
38d9cc60b14c
cleanup revision section, make hg launch tolerant to config errors, drop deprecated exec_prog for desktop configuration in favour of execute_process
koda
parents:
7256
diff
changeset
|
9 |
OUTPUT_VARIABLE internal_version |
38d9cc60b14c
cleanup revision section, make hg launch tolerant to config errors, drop deprecated exec_prog for desktop configuration in favour of execute_process
koda
parents:
7256
diff
changeset
|
10 |
ERROR_QUIET |
38d9cc60b14c
cleanup revision section, make hg launch tolerant to config errors, drop deprecated exec_prog for desktop configuration in favour of execute_process
koda
parents:
7256
diff
changeset
|
11 |
) |
38d9cc60b14c
cleanup revision section, make hg launch tolerant to config errors, drop deprecated exec_prog for desktop configuration in favour of execute_process
koda
parents:
7256
diff
changeset
|
12 |
STRING(REGEX REPLACE "([0-9]+)(.*)" "\\1" revision_number ${internal_version}) |
38d9cc60b14c
cleanup revision section, make hg launch tolerant to config errors, drop deprecated exec_prog for desktop configuration in favour of execute_process
koda
parents:
7256
diff
changeset
|
13 |
set (HEDGEWARS_REVISION ${revision_number}) |
4336 | 14 |
ELSE () |
15 |
set (HEDGEWARS_REVISION ${HEDGEWARS_VERSION}) |
|
16 |
ENDIF () |
|
17 |
||
1999 | 18 |
configure_file(${hedgewars_SOURCE_DIR}/share/Info.plist.in |
19 |
${CMAKE_CURRENT_BINARY_DIR}/Info.plist) |
|
2015 | 20 |
install(PROGRAMS "${CMAKE_CURRENT_BINARY_DIR}/Info.plist" |
21 |
DESTINATION ../) |
|
5172 | 22 |
install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/Icon.icns" |
2015 | 23 |
DESTINATION ../Resources/) |
5252 | 24 |
install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/hwico.icns" |
25 |
DESTINATION ../Resources/) |
|
5172 | 26 |
install(PROGRAMS "${hedgewars_SOURCE_DIR}/share/dsa_pub.pem" |
2393 | 27 |
DESTINATION ../Resources/) |
7256 | 28 |
ENDIF(APPLE OR CROSSAPPLE) |