summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChristian Tellefsen <chris-git@tellefsen.net>2016-01-06 22:20:10 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2016-01-27 09:28:13 +0000
commitadb731c1cd69855b1655a0f23001655392a07340 (patch)
treecf8851dcf2f4737b72304b769bcfbe6f543af3e2 /CMakeLists.txt
parent884795e60f31f0442f6afb2a4cae5a30bc128e27 (diff)
downloadwireshark-adb731c1cd69855b1655a0f23001655392a07340.tar.gz
Allow make-version.pl to use git when missing from path
This change allows make-version.pl to run correctly on Windows without having the git binary dir in PATH. This prevents problems when installing "Git for Windows" with default settings (git only available via the bundled shell (bash). Details: * Add Git to the list of packages to be looked up by CMake. * If Git is found by CMake, pass the full path to make-version.pl * make-version.pl: Test whether git is available, and display a warning if git is missing. On Unix-type systems this should have no impact. Tested on Windows Server 2012 R2 and Ubuntu 15.04. Change-Id: I7f7be2035c262658801586cb24c82b912848e31d Reviewed-on: https://code.wireshark.org/review/13111 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Petri-Dish: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9a6400a42..50d645d183 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -642,7 +642,7 @@ endif()
# - set HAVE_XXX
#The minimum package list
-set(PACKAGELIST Gettext M GLIB2 GMODULE2 GTHREAD2 LEX YACC Perl SED SH PythonInterp)
+set(PACKAGELIST Gettext M Git GLIB2 GMODULE2 GTHREAD2 LEX YACC Perl SED SH PythonInterp)
set(LEX_REQUIRED TRUE)
set(GLIB2_REQUIRED TRUE)
set(GLIB2_FIND_REQUIRED TRUE)
@@ -1142,11 +1142,14 @@ else()
set(WS_MSVC_NORETURN " ")
endif()
+if (${GIT_EXECUTABLE})
+ set(GIT_BIN_PARAM "--git-bin ${GIT_EXECUTABLE}")
+endif()
set( VERSION ${PROJECT_VERSION} )
execute_process(
COMMAND ${PERL_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/make-version.pl
- --print-vcs
+ --print-vcs ${GIT_BIN_PARAM}
${CMAKE_CURRENT_SOURCE_DIR}
OUTPUT_VARIABLE VERSION_H_CONTENT
)