mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-20 20:23:03 +02:00
Add git commit hash into the version string
This commit is contained in:
parent
4bcc43d3d0
commit
d0beb27197
@ -1,6 +1,10 @@
|
|||||||
project(battleAI)
|
project(battleAI)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
add_definitions(-DGIT_SHA1="${GIT_SHA1}")
|
||||||
|
|
||||||
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
|
|
||||||
set(battleAI_SRCS
|
set(battleAI_SRCS
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
project(emptyAI)
|
project(emptyAI)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
add_definitions(-DGIT_SHA1="${GIT_SHA1}")
|
||||||
|
|
||||||
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
|
|
||||||
set(emptyAI_SRCS
|
set(emptyAI_SRCS
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
project(stupidAI)
|
project(stupidAI)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
add_definitions(-DGIT_SHA1="${GIT_SHA1}")
|
||||||
|
|
||||||
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
|
|
||||||
set(stupidAI_SRCS
|
set(stupidAI_SRCS
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
project(VCAI)
|
project(VCAI)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
add_definitions(-DGIT_SHA1="${GIT_SHA1}")
|
||||||
|
|
||||||
if (FL_FOUND)
|
if (FL_FOUND)
|
||||||
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib ${FL_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS} ${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib ${FL_INCLUDE_DIRS})
|
||||||
else()
|
else()
|
||||||
|
@ -341,4 +341,3 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
INCLUDE(CPack)
|
INCLUDE(CPack)
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
project(vcmiclient)
|
project(vcmiclient)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
add_definitions(-DGIT_SHA1="${GIT_SHA1}")
|
||||||
|
|
||||||
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
include_directories(${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} ${SDLMIXER_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR})
|
include_directories(${SDL_INCLUDE_DIR} ${SDLIMAGE_INCLUDE_DIR} ${SDLMIXER_INCLUDE_DIR} ${SDLTTF_INCLUDE_DIR})
|
||||||
include_directories(${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} ${FFMPEG_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR} ${FFMPEG_INCLUDE_DIRS})
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
project(libvcmi)
|
project(libvcmi)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
add_definitions(-DGIT_SHA1="${GIT_SHA1}")
|
||||||
|
|
||||||
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/lib)
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
include_directories(${Boost_INCLUDE_DIRS} ${SDL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
include_directories(${Boost_INCLUDE_DIRS} ${SDL_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
namespace GameConstants
|
namespace GameConstants
|
||||||
{
|
{
|
||||||
const std::string VCMI_VERSION = "VCMI 0.98h";
|
const std::string VCMI_VERSION = "VCMI 0.98h " GIT_SHA1;
|
||||||
|
|
||||||
const int BFIELD_WIDTH = 17;
|
const int BFIELD_WIDTH = 17;
|
||||||
const int BFIELD_HEIGHT = 11;
|
const int BFIELD_HEIGHT = 11;
|
||||||
|
@ -63,17 +63,17 @@ void LibClasses::loadFilesystem()
|
|||||||
CStopWatch loadTime;
|
CStopWatch loadTime;
|
||||||
|
|
||||||
CResourceHandler::initialize();
|
CResourceHandler::initialize();
|
||||||
logGlobal->infoStream()<<"\t Initialization: "<<loadTime.getDiff();
|
logGlobal->infoStream()<<"\tInitialization: "<<loadTime.getDiff();
|
||||||
|
|
||||||
CResourceHandler::load("config/filesystem.json");
|
CResourceHandler::load("config/filesystem.json");
|
||||||
logGlobal->infoStream()<<"\t Data loading: "<<loadTime.getDiff();
|
logGlobal->infoStream()<<"\tData loading: "<<loadTime.getDiff();
|
||||||
|
|
||||||
modh = new CModHandler();
|
modh = new CModHandler();
|
||||||
logGlobal->infoStream()<<"\tMod handler: "<<loadTime.getDiff();
|
logGlobal->infoStream()<<"\tMod handler: "<<loadTime.getDiff();
|
||||||
|
|
||||||
modh->loadMods();
|
modh->loadMods();
|
||||||
modh->loadModFilesystems();
|
modh->loadModFilesystems();
|
||||||
logGlobal->infoStream()<<"\t Mod filesystems: "<<loadTime.getDiff();
|
logGlobal->infoStream()<<"\tMod filesystems: "<<loadTime.getDiff();
|
||||||
|
|
||||||
logGlobal->infoStream()<<"Basic initialization: "<<totalTime.getDiff();
|
logGlobal->infoStream()<<"Basic initialization: "<<totalTime.getDiff();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
project(vcmiserver)
|
project(vcmiserver)
|
||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
add_definitions(-DGIT_SHA1="${GIT_SHA1}")
|
||||||
|
|
||||||
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/lib)
|
||||||
include_directories(${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
|
include_directories(${Boost_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIR})
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
cmake_minimum_required(VERSION 2.6)
|
cmake_minimum_required(VERSION 2.6)
|
||||||
|
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
add_definitions(-DGIT_SHA1="${GIT_SHA1}")
|
||||||
|
|
||||||
enable_testing()
|
enable_testing()
|
||||||
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/test)
|
include_directories(${CMAKE_HOME_DIRECTORY} ${CMAKE_HOME_DIRECTORY}/include ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_HOME_DIRECTORY}/test)
|
||||||
include_directories(${Boost_INCLUDE_DIRS})
|
include_directories(${Boost_INCLUDE_DIRS})
|
||||||
|
Loading…
Reference in New Issue
Block a user