Refactor version file generation
This commit is contained in:
parent
0493e0e008
commit
91f32a9fba
|
@ -30,8 +30,17 @@ set(
|
|||
GL/texture.c
|
||||
GL/util.c
|
||||
GL/yalloc/yalloc.c
|
||||
${CMAKE_CURRENT_BINARY_DIR}/version.c
|
||||
)
|
||||
|
||||
execute_process(
|
||||
COMMAND git describe --abbrev=4 --dirty --always --tags
|
||||
OUTPUT_VARIABLE GLDC_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
configure_file(GL/version.c.in ${CMAKE_CURRENT_BINARY_DIR}/version.c)
|
||||
|
||||
if(PLATFORM_DREAMCAST)
|
||||
set(SOURCES ${SOURCES} GL/platforms/sh4.c)
|
||||
else()
|
||||
|
|
2
GL/version.c.in
Normal file
2
GL/version.c.in
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
const char* GLDC_VERSION = "@GLDC_VERSION@";
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern const char* GLDC_VERSION;
|
||||
|
||||
|
||||
/*
|
||||
* Dreamcast specific compressed + twiddled formats.
|
||||
* We use constants from the range 0xEEE0 onwards
|
||||
|
|
Loading…
Reference in New Issue
Block a user