From 908566e65729860c95dd138a422264c4243e5de4 Mon Sep 17 00:00:00 2001 From: Joseph Bethge Date: Wed, 24 Jan 2018 14:55:30 +0100 Subject: [PATCH 1/2] add possibility to build in nested folders --- configure | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 18be4ea..8d8c649 100755 --- a/configure +++ b/configure @@ -106,12 +106,13 @@ echo "" # Create build directory if [ ! -d "./$BUILD_DIR" ] then - mkdir $BUILD_DIR + mkdir -p "$BUILD_DIR" fi # Configure project +PREVIOUS_DIR=$(pwd) cd $BUILD_DIR -cmake -G "$CMAKE_GENERATOR" "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" $CMAKE_OPTIONS .. +cmake -G "$CMAKE_GENERATOR" "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" $CMAKE_OPTIONS "$PREVIOUS_DIR" if [ $? == 0 ] then echo "" @@ -123,4 +124,4 @@ else echo "Configuration failed."; fi -cd .. +cd "$PREVIOUS_DIR" From df1cc14a3c5d888c6d93b211c61528cbe3a7e716 Mon Sep 17 00:00:00 2001 From: Joseph Bethge Date: Wed, 24 Jan 2018 15:37:17 +0100 Subject: [PATCH 2/2] also allow absolute paths --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 8d8c649..ea46f1b 100755 --- a/configure +++ b/configure @@ -104,7 +104,7 @@ echo "Configuring ..." echo "" # Create build directory -if [ ! -d "./$BUILD_DIR" ] +if [ ! -d "$BUILD_DIR" ] then mkdir -p "$BUILD_DIR" fi