From dcc972f128b40bfcc97d9e03dd43f651dd3924a0 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Wed, 14 Aug 2013 21:34:29 +0200 Subject: [PATCH] Allow source location to be overridden By default the configure script assumes that the source is located relative to the script itself. By allowing this to be overridden, the script can be shared by other projects, each passing their own location as an extra parameter. --- cmake/Scripts/configure | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/Scripts/configure b/cmake/Scripts/configure index 1c58205a6..468aa17d6 100755 --- a/cmake/Scripts/configure +++ b/cmake/Scripts/configure @@ -1,6 +1,6 @@ #!/bin/bash -# where is the source tree located +# where is the source tree located by default relative to here srcdir=$(dirname $(dirname $(dirname "$0"))) # display help text @@ -141,6 +141,11 @@ for OPT in "$@"; do OPTARG=${OPT#--} # OPTARG now contains everything after double dashes case "${OPTARG}" in + src-dir=*) + # allow the user to use these build macros for another + # project (so source-dir is not relative to us) + srcdir=${OPTARG#*=} + ;; prefix=*) # remove prefix consisting of everything up to equal sign prefix=${OPTARG#*=}