@ -1,3 +1,16 @@
if ( NOT EXISTS ${ dfhack_SOURCE_DIR } /.git/index OR NOT EXISTS ${ dfhack_SOURCE_DIR } /.git/modules/library/xml/index )
MESSAGE ( FATAL_ERROR "Could not find git index file(s)" )
endif ( )
set ( git_describe_tmp_h ${ dfhack_SOURCE_DIR } /library/include/git-describe.tmp.h )
set ( git_describe_h ${ dfhack_SOURCE_DIR } /library/include/git-describe.h )
if ( EXISTS ${ git_describe_tmp_h } AND
NOT ( ${ dfhack_SOURCE_DIR } /.git/index IS_NEWER_THAN ${ git_describe_tmp_h } ) A N D
NOT ( ${ dfhack_SOURCE_DIR } /.git/modules/library/xml/index IS_NEWER_THAN ${ git_describe_tmp_h } ) )
return ( )
endif ( )
execute_process ( COMMAND ${ GIT_EXECUTABLE } describe --tags --abbrev=8 --long
execute_process ( COMMAND ${ GIT_EXECUTABLE } describe --tags --abbrev=8 --long
W O R K I N G _ D I R E C T O R Y " $ { d f h a c k _ S O U R C E _ D I R } "
W O R K I N G _ D I R E C T O R Y " $ { d f h a c k _ S O U R C E _ D I R } "
O U T P U T _ V A R I A B L E D F H A C K _ G I T _ D E S C R I P T I O N )
O U T P U T _ V A R I A B L E D F H A C K _ G I T _ D E S C R I P T I O N )
@ -17,9 +30,6 @@ execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse HEAD
W O R K I N G _ D I R E C T O R Y " $ { d f h a c k _ S O U R C E _ D I R } / l i b r a r y / x m l "
W O R K I N G _ D I R E C T O R Y " $ { d f h a c k _ S O U R C E _ D I R } / l i b r a r y / x m l "
O U T P U T _ V A R I A B L E D F H A C K _ G I T _ X M L _ C O M M I T )
O U T P U T _ V A R I A B L E D F H A C K _ G I T _ X M L _ C O M M I T )
set ( git_describe_tmp_h ${ dfhack_SOURCE_DIR } /library/include/git-describe.tmp.h )
set ( git_describe_h ${ dfhack_SOURCE_DIR } /library/include/git-describe.h )
file ( WRITE ${ git_describe_tmp_h } "" )
file ( WRITE ${ git_describe_tmp_h } "" )
macro ( git_describe_definition var )
macro ( git_describe_definition var )