From 2dbda7d9bb23f050673841c42f845be539e19a2c Mon Sep 17 00:00:00 2001 From: Juergen Kahrs Date: Sun, 19 May 2013 17:15:26 +0200 Subject: configure parameters CC and --prefix work now. --- cmake/configure | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'cmake/configure') 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 .. -- cgit v1.2.3