Move/rename git revision info compiled into FC to be more self-explanatory
This commit is contained in:
parent
cb6014eecc
commit
5719d28a19
5 changed files with 24 additions and 20 deletions
|
|
@ -16,8 +16,8 @@ INCLUDE( VersionMacros )
|
|||
INCLUDE( SetupTargetMacros )
|
||||
INCLUDE(GetGitRevisionDescription)
|
||||
|
||||
get_git_head_revision(GIT_REFSPEC GIT_SHA3)
|
||||
get_git_unix_timestamp(GIT_UNIX_TIMESTAMP3)
|
||||
get_git_head_revision(GIT_REFSPEC FC_GIT_REVISION_SHA)
|
||||
get_git_unix_timestamp(FC_GIT_REVISION_UNIX_TIMESTAMP)
|
||||
|
||||
SET( DEFAULT_HEADER_INSTALL_DIR include/\${target} )
|
||||
SET( DEFAULT_LIBRARY_INSTALL_DIR lib/ )
|
||||
|
|
@ -168,8 +168,8 @@ set( sources
|
|||
${fc_sources}
|
||||
)
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/GitSHA3.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/GitSHA3.cpp" @ONLY)
|
||||
list(APPEND sources "${CMAKE_CURRENT_BINARY_DIR}/GitSHA3.cpp" GitSHA3.h)
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/src/git_revision.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/git_revision.cpp" @ONLY)
|
||||
list(APPEND sources "${CMAKE_CURRENT_BINARY_DIR}/git_revision.cpp")
|
||||
list(APPEND sources ${fc_headers})
|
||||
|
||||
add_subdirectory( vendor/easylzma )
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
#include <stdint.h>
|
||||
#include "GitSHA3.h"
|
||||
|
||||
#define GIT_SHA3 "@GIT_SHA3@"
|
||||
const char* const g_GIT_SHA3 = GIT_SHA3;
|
||||
#define GIT_UNIX_TIMESTAMP3 @GIT_UNIX_TIMESTAMP3@
|
||||
const uint32_t g_GIT_UNIX_TIMESTAMP3 = GIT_UNIX_TIMESTAMP3;
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
#ifndef __GITSHA3_H
|
||||
#define __GITSHA3_H
|
||||
|
||||
extern const char* const g_GIT_SHA3;
|
||||
extern const uint32_t g_GIT_UNIX_TIMESTAMP3;
|
||||
|
||||
#define APPLICATION_VERSION "1.0 Beta1"
|
||||
|
||||
#endif ///__GITSHA3_H
|
||||
9
include/fc/git_revision.hpp
Normal file
9
include/fc/git_revision.hpp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
namespace fc {
|
||||
|
||||
extern const char* const git_revision_sha;
|
||||
extern const uint32_t git_revision_unix_timestamp;
|
||||
|
||||
} // end namespace fc
|
||||
11
src/git_revision.cpp.in
Normal file
11
src/git_revision.cpp.in
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#include <fc/git_revision.hpp>
|
||||
|
||||
#define FC_GIT_REVISION_SHA "@FC_GIT_REVISION_SHA@"
|
||||
#define FC_GIT_REVISION_UNIX_TIMESTAMP @FC_GIT_REVISION_UNIX_TIMESTAMP@
|
||||
|
||||
namespace fc {
|
||||
|
||||
const char* const git_revision_sha = FC_GIT_REVISION_SHA;
|
||||
const uint32_t git_revision_unix_timestamp = FC_GIT_REVISION_UNIX_TIMESTAMP;
|
||||
|
||||
} // end namespace fc
|
||||
Loading…
Reference in a new issue