From: Thomas Debesse Date: Sat, 4 Apr 2020 00:25:11 +0000 (+0200) Subject: tools/cmake: do not compute git version again X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=commitdiff_plain;h=94209cef439ccc6b58d51c49f3381d9149a66006 tools/cmake: do not compute git version again --- diff --git a/tools/quake3/CMakeLists.txt b/tools/quake3/CMakeLists.txt index 41af91c5..82bc897d 100644 --- a/tools/quake3/CMakeLists.txt +++ b/tools/quake3/CMakeLists.txt @@ -1,16 +1,11 @@ include_directories(BEFORE common) set(Q3MAP_VERSION 2.5.17n) -find_package(Git REQUIRED) -execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE -) + if (GIT_VERSION) set(Q3MAP_VERSION "${Q3MAP_VERSION}-git-${GIT_VERSION}") endif () + add_definitions(-DQ3MAP_VERSION="${Q3MAP_VERSION}") find_package(GLIB REQUIRED) diff --git a/tools/quake3/q3map2/help.c b/tools/quake3/q3map2/help.c index 82284743..e56b99a0 100644 --- a/tools/quake3/q3map2/help.c +++ b/tools/quake3/q3map2/help.c @@ -68,6 +68,7 @@ void HelpOptions(const char* group_name, int indentation, int width, struct Help putchar('\n'); printed = indentation+26; } + if ( j == 0 ) { printf("%s\n",options[i].description+j); @@ -143,6 +144,7 @@ void HelpBsp() {"-tmpout", "Write the BSP file to /tmp"}, {"-verboseentities", "Enable `-v` only for map entities, not for the world"}, }; + HelpOptions("BSP Stage", 0, 80, bsp, sizeof(bsp)/sizeof(struct HelpOption)); } @@ -163,6 +165,7 @@ void HelpVis() {"-tmpout", "Use /tmp folder for output"}, {"-v -v", "Extra verbose mode for cluster debug"}, // q3map2 common takes first -v }; + HelpOptions("VIS Stage", 0, 80, vis, sizeof(vis)/sizeof(struct HelpOption)); } @@ -301,6 +304,7 @@ void HelpScale() {"-tex", "Scale without texture lock"}, {"-spawn_ref ", "Vertical offset for info_player_* entities (adds spawn_ref, scales, subtracts spawn_ref)"}, }; + HelpOptions("Scaling", 0, 80, scale, sizeof(scale)/sizeof(struct HelpOption)); } @@ -416,7 +420,6 @@ void HelpCommon() }; HelpOptions("Common Options", 0, 80, common, sizeof(common)/sizeof(struct HelpOption)); - } void HelpMain(const char* arg) @@ -440,6 +443,7 @@ void HelpMain(const char* arg) {"-import", "Importing lightmaps"}, {"-minimap", "MiniMap"}, }; + void(*help_funcs[])() = { HelpBsp, HelpVis,