Applied cmake SOURCE_DATE_EPOCH patch for reproducible builds.
This commit is contained in:
parent
bb4b88d00e
commit
f6e184952b
|
@ -556,6 +556,13 @@ set(SRC_DRIVERS_SDL
|
|||
|
||||
set(SOURCES ${SRC_CORE} ${SRC_DRIVERS_COMMON} ${SRC_DRIVERS_SDL})
|
||||
|
||||
# Put build timestamp into BUILD_TS environment variable and from there into
|
||||
# the FCEUX_BUILD_TIMESTAMP preprocessor definition.
|
||||
# Note: with CMake >= 3.8.0, this will respect SOURCE_DATE_EPOCH. For more info,
|
||||
# see <https://reproducible-builds.org/docs/source-date-epoch/>.
|
||||
string(TIMESTAMP BUILD_TS "%H:%M:%S %b %d %Y")
|
||||
add_definitions( -DFCEUX_BUILD_TIMESTAMP=\"${BUILD_TS}\" )
|
||||
|
||||
if (WIN32)
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/fceux_git_info.cpp
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
|
||||
static char *aboutString = 0;
|
||||
|
||||
#ifndef FCEUX_BUILD_TIMESTAMP
|
||||
#define FCEUX_BUILD_TIMESTAMP __TIME__ " " __DATE__
|
||||
#endif
|
||||
|
||||
// returns a string suitable for use in an aboutbox
|
||||
const char *FCEUI_GetAboutString(void)
|
||||
{
|
||||
|
@ -48,7 +52,8 @@ const char *FCEUI_GetAboutString(void)
|
|||
"of NES emulation. In Memoriam --\n"
|
||||
"ugetab\n"
|
||||
"\n"
|
||||
__TIME__ " " __DATE__ "\n";
|
||||
"\n"
|
||||
FCEUX_BUILD_TIMESTAMP "\n";
|
||||
|
||||
if (aboutString) return aboutString;
|
||||
|
||||
|
|
Loading…
Reference in New Issue