aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-05-19 17:15:26 +0200
committerJuergen Kahrs <Juergen.Kahrs@googlemail.com>2013-05-19 17:15:26 +0200
commit2dbda7d9bb23f050673841c42f845be539e19a2c (patch)
treea2ac822f2fc9e955546ee31acbfc00ce89f493f5
parent20c76cfdadff3bf969279038ac0408ec179a8efd (diff)
downloadegawk-2dbda7d9bb23f050673841c42f845be539e19a2c.tar.gz
egawk-2dbda7d9bb23f050673841c42f845be539e19a2c.tar.bz2
egawk-2dbda7d9bb23f050673841c42f845be539e19a2c.zip
configure parameters CC and --prefix work now.
-rwxr-xr-xcmake/configure11
1 files changed, 10 insertions, 1 deletions
diff --git a/cmake/configure b/cmake/configure
index 922568de..356bdfca 100755
--- a/cmake/configure
+++ b/cmake/configure
@@ -34,6 +34,15 @@ fi
# TODO: Evaluate all the options and translate the options into CMake variables.
CC=$( which cc )
+PREFIX=""
+
+for p in $@
+do
+ if [ ${p:0:3} = "CC=" ]; then CC=${p:3}; fi
+ if [ ${p:0:9} = "--prefix=" ]; then PREFIX=-DCMAKE_INSTALL_PREFIX=${p:9}; fi
+done
+CC=$( which $CC )
+
rm -f Toolchain.cmake
(
echo "set(CMAKE_C_COMPILER $CC)"
@@ -44,5 +53,5 @@ rm -f Toolchain.cmake
# TODO: Allow the build directory to be in other places.
# A parameter is needed to pass the value.
-cmake -DCMAKE_TOOLCHAIN_FILE=Toolchain.cmake ..
+cmake ${PREFIX} -DCMAKE_TOOLCHAIN_FILE=Toolchain.cmake ..