|
|
1.1 ! root 1: #!/bin/sh ! 2: ! 3: # NOTE: this is a simple script wrapper around the cmake command line tools, ! 4: # for those used to the autotools configure script conventions ! 5: ! 6: if ! which cmake > /dev/null; then ! 7: echo "ERROR: You need the 'cmake' program to configure the Previous build process." ! 8: echo "Please install 'cmake' first, then try again." ! 9: exit 1 ! 10: fi ! 11: ! 12: print_help() ! 13: { ! 14: echo "This is a simple configure script wrapper around cmake build system." ! 15: echo "Parameters are:" ! 16: echo " --prefix=<path> Set the install prefix to path" ! 17: echo " --enable-debug Enable debug (non-optimized) build" ! 18: echo " --disable-tracing Disable tracing messages for debugging" ! 19: echo " --disable-osx-bundle Disable application bundling on Mac OS X" ! 20: echo " --cross-compile-win32 Build the Windows version under linux" ! 21: echo ! 22: echo "Please run cmake directly for full control over the build." ! 23: echo ! 24: } ! 25: ! 26: cmake_args="" ! 27: build_type="Release" ! 28: ! 29: while [ $# -gt 0 ] ! 30: do ! 31: preq=${1%=*} # get part before = ! 32: case $preq ! 33: in ! 34: --help) ! 35: print_help ! 36: exit 0 ! 37: ;; ! 38: --prefix) ! 39: prefix=${1##*=} # get part after = ! 40: cmake_args="$cmake_cmd -DCMAKE_INSTALL_PREFIX:PATH=$prefix" ! 41: ;; ! 42: --enable-debug) ! 43: build_type="Debug" ! 44: cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Debug" ! 45: ;; ! 46: --disable-debug) ! 47: build_type="Release" ! 48: cmake_args="$cmake_args -DCMAKE_BUILD_TYPE:STRING=Release" ! 49: ;; ! 50: --enable-tracing) ! 51: cmake_args="$cmake_args -DENABLE_TRACING:BOOL=1" ! 52: ;; ! 53: --disable-tracing) ! 54: cmake_args="$cmake_args -DENABLE_TRACING:BOOL=0" ! 55: ;; ! 56: --enable-osx-bundle) ! 57: cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=1" ! 58: ;; ! 59: --disable-osx-bundle) ! 60: cmake_args="$cmake_args -DENABLE_OSX_BUNDLE:BOOL=0" ! 61: ;; ! 62: --cross-compile-win32) ! 63: cmake_args="$cmake_args -DCMAKE_TOOLCHAIN_FILE=cmake/Toolchain-mingw32.cmake" ! 64: ;; ! 65: *) ! 66: echo "Invalid argument: $preq" ! 67: echo "Run $0 --help for a list of valid parameters." ! 68: exit 2 ! 69: ;; ! 70: esac ! 71: shift 1 ! 72: done ! 73: ! 74: # remove previous cmake's cache ! 75: rm -f `dirname $0`/CMakeCache.txt ! 76: ! 77: cmake `dirname $0` $cmake_args || exit 1 ! 78: ! 79: echo ! 80: echo "Now you must type: make; make install" ! 81: echo "to actually build and install the software" ! 82: echo
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.