CMake: fix Git binary parameter

if (${GIT_EXECUTABLE}) never worked, hence the variable GIT_BIN_PARAM never had
any value, and by so never added the Optional git-bin parameter
to make-version.pl

Make-version.pl now handle optional git-bin argument with value.

Change-Id: I089539a3d33455b8de09928b54e0ea39d1aecbb8
Reviewed-on: https://code.wireshark.org/review/27485
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
This commit is contained in:
Joakim Karlsson 2018-05-13 09:32:25 +02:00 committed by Peter Wu
parent 4fd404d8da
commit e21da73826
2 changed files with 3 additions and 3 deletions

View File

@ -1402,8 +1402,8 @@ endif()
include(gmxTestLargeFiles)
gmx_test_large_files(GMX_LARGEFILES)
if (${GIT_EXECUTABLE})
set(GIT_BIN_PARAM "--git-bin ${GIT_EXECUTABLE}")
if (GIT_EXECUTABLE)
set(GIT_BIN_PARAM --git-bin ${GIT_EXECUTABLE})
endif()
set( VERSION ${PROJECT_VERSION} )
if(NOT CMAKE_VERSION VERSION_LESS "3.2.1")

View File

@ -627,7 +627,7 @@ sub get_config {
"help|h", \$show_help,
"get-vcs|get-svn|g", \$get_vcs,
"set-vcs|set-svn|s", \$set_vcs,
"git-bin", \$git_executable,
"git-bin=s" => \$git_executable,
"print-vcs", \$print_vcs,
"set-version|v", \$set_version,
"set-release|r|package-version|p", \$set_release,