1 project(hedgewars) |
1 project(hedgewars) |
2 |
2 |
3 cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) |
3 cmake_minimum_required(VERSION 2.6.0 FATAL_ERROR) |
4 |
4 |
5 if(COMMAND cmake_policy) |
5 IF(COMMAND cmake_policy) |
6 cmake_policy(SET CMP0003 NEW) |
6 cmake_policy(SET CMP0003 NEW) |
7 endif(COMMAND cmake_policy) |
7 ENDIF(COMMAND cmake_policy) |
8 |
8 |
9 #detect subversion revision (if present) |
9 #detect subversion revision (if present) |
10 set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME |
10 set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME |
11 IF (version_suffix MATCHES "-dev" AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn) |
11 IF(version_suffix MATCHES "-dev") |
12 FIND_PACKAGE(Subversion) |
12 set(HW_DEV true) |
13 IF(Subversion_FOUND) |
13 IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.svn) |
14 Subversion_WC_INFO(${CMAKE_HOME_DIRECTORY} Project) |
14 FIND_PACKAGE(Subversion) |
15 MESSAGE(STATUS "Builing revision ${Project_WC_REVISION}") |
15 IF(Subversion_FOUND) |
16 set(version_suffix ".${Project_WC_REVISION}") |
16 Subversion_WC_INFO(${CMAKE_HOME_DIRECTORY} Project) |
17 ENDIF(Subversion_FOUND) |
17 MESSAGE(STATUS "Builing revision ${Project_WC_REVISION}") |
|
18 set(version_suffix ".${Project_WC_REVISION}") |
|
19 ENDIF(Subversion_FOUND) |
|
20 ENDIF() |
|
21 ELSE() |
|
22 set(HW_DEV false) |
18 ENDIF() |
23 ENDIF() |
19 |
24 |
20 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules) |
25 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules) |
21 |
26 |
22 set(CPACK_PACKAGE_VERSION_MAJOR "0") |
27 set(CPACK_PACKAGE_VERSION_MAJOR "0") |