From efbd22a33f0183170f1e6d77ddabcd0cfea01a74 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Thu, 2 Dec 2010 14:23:20 -0600 Subject: [PATCH] Allow CMake generators to pass through configure The default generator is Unix Makefiles for most platforms, but this lets the builder easily select a different build framework depending on their platform (e.g. Xcode, CodeBlocks, Eclipse ...) --- configure | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d82c79b1ae..ec66a68e98 100755 --- a/configure +++ b/configure @@ -14,8 +14,9 @@ use this configure script to access CMake equivalent functionality.\ usage="\ Usage: $0 [OPTION]... [VAR=VALUE]... - Build Directory: + Build Options: --builddir=DIR place build files in directory [build] + --generator=GENERATOR CMake generator to use (see cmake --help) Installation Directories: --prefix=PREFIX installation directory [/usr/local/bro] @@ -94,6 +95,9 @@ while [ $# -ne 0 ]; do --builddir=*) builddir=$optarg ;; + --generator=*) + CMakeGenerator="$optarg" + ;; --prefix=*) append_cache_entry CMAKE_INSTALL_PREFIX PATH $optarg append_cache_entry BRO_ROOT_DIR PATH $optarg @@ -186,4 +190,9 @@ fi echo "Build Directory : $builddir" echo "Source Directory: $sourcedir" cd $builddir -cmake $CMakeCacheEntries $sourcedir + +if [ -n "$CMakeGenerator" ]; then + cmake -G "$CMakeGenerator" $CMakeCacheEntries $sourcedir +else + cmake $CMakeCacheEntries $sourcedir +fi