mirror of
https://github.com/halpz/re3.git
synced 2025-06-28 13:56:21 +00:00
Cmake version for hash
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
|
||||
file(GLOB_RECURSE ${PROJECT}_SOURCES "*.cpp" "*.h" "*.rc")
|
||||
|
||||
@ -17,6 +17,9 @@ endfunction()
|
||||
|
||||
header_directories(${PROJECT}_INCLUDES)
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/extras/GitSHA1.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/extras/GitSHA1.cpp" @ONLY)
|
||||
list(APPEND ${PROJECT}_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/extras/GitSHA1.cpp")
|
||||
|
||||
add_executable(${EXECUTABLE} WIN32
|
||||
${${PROJECT}_SOURCES}
|
||||
)
|
||||
@ -46,6 +49,8 @@ if(LIBRW_PLATFORM_D3D9)
|
||||
)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${EXECUTABLE} PRIVATE CMAKE_BUILD)
|
||||
|
||||
if(${PROJECT}_AUDIO STREQUAL "OAL")
|
||||
find_package(OpenAL REQUIRED)
|
||||
target_include_directories(${EXECUTABLE} PRIVATE ${OPENAL_INCLUDE_DIR})
|
||||
|
@ -195,8 +195,8 @@ enum Config {
|
||||
// those infamous texts
|
||||
#define DRAW_GAME_VERSION_TEXT
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
#define TOGGLEABLE_VERSION_TEXT
|
||||
#define USE_OUR_VERSIONING // If you disable this then game will fetch version peds.col, as R* did while in development
|
||||
// unlike R* development builds, ours has runtime switch on debug menu & .ini, and disabled as default.
|
||||
#define USE_OUR_VERSIONING // If you disable this then game will fetch version from peds.col, as R* did while in development
|
||||
#endif
|
||||
|
||||
// Memory allocation and compression
|
||||
|
@ -94,8 +94,8 @@ bool gbModelViewer;
|
||||
#ifdef TIMEBARS
|
||||
bool gbShowTimebars;
|
||||
#endif
|
||||
#ifdef TOGGLEABLE_VERSION_TEXT
|
||||
bool gDrawVersionText;
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
bool gDrawVersionText; // Our addition, we think it was always enabled on !MASTER builds
|
||||
#endif
|
||||
|
||||
volatile int32 frameCount;
|
||||
@ -1068,9 +1068,7 @@ DisplayGameDebugText()
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
wchar ver[200];
|
||||
|
||||
#ifdef TOGGLEABLE_VERSION_TEXT
|
||||
if(gDrawVersionText)
|
||||
#endif
|
||||
if(gDrawVersionText) // This realtime switch is our thing
|
||||
{
|
||||
|
||||
#ifdef USE_OUR_VERSIONING
|
||||
|
@ -457,7 +457,7 @@ bool LoadINISettings()
|
||||
#ifdef FIX_SPRITES
|
||||
ReadIniIfExists("Draw", "FixSprites", &CDraw::ms_bFixSprites);
|
||||
#endif
|
||||
#ifdef TOGGLEABLE_VERSION_TEXT
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
extern bool gDrawVersionText;
|
||||
ReadIniIfExists("General", "DrawVersionText", &gDrawVersionText);
|
||||
#endif
|
||||
@ -554,7 +554,7 @@ void SaveINISettings()
|
||||
#ifdef FIX_SPRITES
|
||||
StoreIni("Draw", "FixSprites", CDraw::ms_bFixSprites);
|
||||
#endif
|
||||
#ifdef TOGGLEABLE_VERSION_TEXT
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
extern bool gDrawVersionText;
|
||||
StoreIni("General", "DrawVersionText", gDrawVersionText);
|
||||
#endif
|
||||
@ -997,7 +997,7 @@ extern bool gbRenderWorld2;
|
||||
DebugMenuAddVarBool8("Draw", "Fix Sprites", &CDraw::ms_bFixSprites, nil);
|
||||
#endif
|
||||
|
||||
#ifdef TOGGLEABLE_VERSION_TEXT
|
||||
#ifdef DRAW_GAME_VERSION_TEXT
|
||||
extern bool gDrawVersionText;
|
||||
DebugMenuAddVarBool8("Debug", "Version Text", &gDrawVersionText, nil);
|
||||
#endif
|
||||
|
@ -1,2 +0,0 @@
|
||||
#define GIT_SHA1 ""
|
||||
const char* g_GIT_SHA1 = GIT_SHA1;
|
2
src/extras/GitSHA1.cpp.in
Normal file
2
src/extras/GitSHA1.cpp.in
Normal file
@ -0,0 +1,2 @@
|
||||
#define GIT_SHA1 "@GIT_SHA1@"
|
||||
const char* g_GIT_SHA1 = GIT_SHA1;
|
Reference in New Issue
Block a user