CMakeLists.txt
changeset 4252 13ec087713dd
parent 4098 40df542b5f62
child 4309 a69c73c5d173
equal deleted inserted replaced
4250:d83b53997e0b 4252:13ec087713dd
     5 
     5 
     6 IF(POLICY CMP0012)
     6 IF(POLICY CMP0012)
     7 	cmake_policy(SET CMP0012 NEW)
     7 	cmake_policy(SET CMP0012 NEW)
     8 ENDIF()
     8 ENDIF()
     9 
     9 
    10 #detect subversion revision (if present)
    10 #detect Mercurial revision (if present)
    11 set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME
    11 set(version_suffix "-dev") #UNSET THIS VARIABLE AT RELEASE TIME
    12 IF(version_suffix MATCHES "-dev")
    12 IF(version_suffix MATCHES "-dev")
    13 	set(HW_DEV true)
    13 	set(HW_DEV true)
    14 	IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg)
    14 	IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/.hg)
    15 		FIND_PROGRAM(HGCOMMAND hg)
    15 		FIND_PROGRAM(HGCOMMAND hg)
    33 
    33 
    34 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
    34 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
    35 
    35 
    36 set(CPACK_PACKAGE_VERSION_MAJOR "0")
    36 set(CPACK_PACKAGE_VERSION_MAJOR "0")
    37 set(CPACK_PACKAGE_VERSION_MINOR "9")
    37 set(CPACK_PACKAGE_VERSION_MINOR "9")
    38 set(CPACK_PACKAGE_VERSION_PATCH "14${version_suffix}")
    38 set(CPACK_PACKAGE_VERSION_PATCH "15${version_suffix}")
    39 
    39 
    40 #forbid in-tree building
    40 #forbid in-tree building
    41 #IF (${CMAKE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR})
    41 #IF (${CMAKE_SOURCE_DIR} MATCHES ${CMAKE_BINARY_DIR})
    42 #	MESSAGE(STATUS "Please do an out-of-tree build:")
    42 #	MESSAGE(STATUS "Please do an out-of-tree build:")
    43 #	MESSAGE(STATUS "rm CMakeCache.txt; mkdir build; cd build; cmake ..; make")
    43 #	MESSAGE(STATUS "rm CMakeCache.txt; mkdir build; cd build; cmake ..; make")
   167 	set(SHAREPATH share/hedgewars/)
   167 	set(SHAREPATH share/hedgewars/)
   168 endif()
   168 endif()
   169 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
   169 set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
   170 
   170 
   171 set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
   171 set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
   172 set(HEDGEWARS_PROTO_VER 32)
   172 set(HEDGEWARS_PROTO_VER 34)
   173 
   173 
   174 if(WITH_SERVER)
   174 if(WITH_SERVER)
   175 	message(STATUS "Server is going to be built! Make sure you have GHC installed")
   175 	message(STATUS "Server is going to be built! Make sure you have GHC installed")
   176 	set(HAVE_NETSERVER true)
   176 	set(HAVE_NETSERVER true)
   177 	add_subdirectory(gameServer)
   177 	add_subdirectory(gameServer)