"Added code to get the revision of fc repo"
This commit is contained in:
parent
59f80e34d2
commit
91d35546fc
3 changed files with 21 additions and 0 deletions
|
|
@ -11,6 +11,10 @@ INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR} )
|
||||||
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include )
|
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include )
|
||||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/vendor/cyoencode-1.0.2/src )
|
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR}/vendor/cyoencode-1.0.2/src )
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/GitVersionGen/")
|
||||||
|
include(GetGitRevisionDescription)
|
||||||
|
get_git_head_revision(GIT_REFSPEC GIT_SHA3)
|
||||||
|
|
||||||
SET( DEFAULT_HEADER_INSTALL_DIR include/\${target} )
|
SET( DEFAULT_HEADER_INSTALL_DIR include/\${target} )
|
||||||
SET( DEFAULT_LIBRARY_INSTALL_DIR lib/ )
|
SET( DEFAULT_LIBRARY_INSTALL_DIR lib/ )
|
||||||
SET( DEFAULT_EXECUTABLE_INSTALL_DIR bin/ )
|
SET( DEFAULT_EXECUTABLE_INSTALL_DIR bin/ )
|
||||||
|
|
@ -131,6 +135,7 @@ set( fc_sources
|
||||||
# vendor/salsa20/ecrypt.c
|
# vendor/salsa20/ecrypt.c
|
||||||
${SALSA_SRC}
|
${SALSA_SRC}
|
||||||
)
|
)
|
||||||
|
|
||||||
SET_PROPERTY( SOURCE
|
SET_PROPERTY( SOURCE
|
||||||
vendor/salsa20/salsa20.s
|
vendor/salsa20/salsa20.s
|
||||||
PROPERTY LANGUAGE C)
|
PROPERTY LANGUAGE C)
|
||||||
|
|
@ -138,6 +143,10 @@ set( fc_sources
|
||||||
set( sources
|
set( sources
|
||||||
${fc_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)
|
||||||
|
|
||||||
add_subdirectory( vendor/easylzma )
|
add_subdirectory( vendor/easylzma )
|
||||||
|
|
||||||
setup_library( fc SOURCES ${sources} LIBRARY_TYPE STATIC )
|
setup_library( fc SOURCES ${sources} LIBRARY_TYPE STATIC )
|
||||||
|
|
|
||||||
4
GitSHA3.cpp.in
Normal file
4
GitSHA3.cpp.in
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#include "GitSHA3.h"
|
||||||
|
|
||||||
|
#define GIT_SHA3 "@GIT_SHA3@"
|
||||||
|
const char* const g_GIT_SHA3 = GIT_SHA3;
|
||||||
8
GitSHA3.h
Normal file
8
GitSHA3.h
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
#ifndef __GITSHA3_H
|
||||||
|
#define __GITSHA3_H
|
||||||
|
|
||||||
|
extern const char* const g_GIT_SHA3;
|
||||||
|
|
||||||
|
#define APPLICATION_VERSION "1.0 Beta1"
|
||||||
|
|
||||||
|
#endif ///__GITSHA3_H
|
||||||
Loading…
Reference in a new issue