]> git.xonotic.org Git - xonotic/netradiant.git/commitdiff
tools/cmake: do not compute git version again
authorThomas Debesse <dev@illwieckz.net>
Sat, 4 Apr 2020 00:25:11 +0000 (02:25 +0200)
committerThomas Debesse <dev@illwieckz.net>
Sat, 4 Apr 2020 00:25:11 +0000 (02:25 +0200)
tools/quake3/CMakeLists.txt
tools/quake3/q3map2/help.c

index 41af91c51da4117a8c6685c92f3a89d75e513803..82bc897d0ff3bd7a9d6215684ffee3bcbd27ccc4 100644 (file)
@@ -1,16 +1,11 @@
 include_directories(BEFORE common)
 
 set(Q3MAP_VERSION 2.5.17n)
 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 ()
 if (GIT_VERSION)
     set(Q3MAP_VERSION "${Q3MAP_VERSION}-git-${GIT_VERSION}")
 endif ()
+
 add_definitions(-DQ3MAP_VERSION="${Q3MAP_VERSION}")
 
 find_package(GLIB REQUIRED)
 add_definitions(-DQ3MAP_VERSION="${Q3MAP_VERSION}")
 
 find_package(GLIB REQUIRED)
index 8228474336636bd144c5cc305e9c9b39b476d2d7..e56b99a08391533bd0c573e11837ac57c453adce 100644 (file)
@@ -68,6 +68,7 @@ void HelpOptions(const char* group_name, int indentation, int width, struct Help
                        putchar('\n');
                        printed = indentation+26;
                }
                        putchar('\n');
                        printed = indentation+26;
                }
+
                if ( j == 0 )
                {
                        printf("%s\n",options[i].description+j);
                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"},
        };
                {"-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));
 }
 
        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
        };
                {"-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));
 }
 
        HelpOptions("VIS Stage", 0, 80, vis, sizeof(vis)/sizeof(struct HelpOption));
 }
 
@@ -301,6 +304,7 @@ void HelpScale()
                {"-tex", "Scale without texture lock"},
                {"-spawn_ref <F>", "Vertical offset for info_player_* entities (adds spawn_ref, scales, subtracts spawn_ref)"},
        };
                {"-tex", "Scale without texture lock"},
                {"-spawn_ref <F>", "Vertical offset for info_player_* entities (adds spawn_ref, scales, subtracts spawn_ref)"},
        };
+
        HelpOptions("Scaling", 0, 80, scale, sizeof(scale)/sizeof(struct HelpOption));
 }
 
        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));
        };
 
        HelpOptions("Common Options", 0, 80, common, sizeof(common)/sizeof(struct HelpOption));
-
 }
 
 void HelpMain(const char* arg)
 }
 
 void HelpMain(const char* arg)
@@ -440,6 +443,7 @@ void HelpMain(const char* arg)
                {"-import", "Importing lightmaps"},
                {"-minimap", "MiniMap"},
        };
                {"-import", "Importing lightmaps"},
                {"-minimap", "MiniMap"},
        };
+
        void(*help_funcs[])() = {
                HelpBsp,
                HelpVis,
        void(*help_funcs[])() = {
                HelpBsp,
                HelpVis,