--- /dev/null
+#include <iostream>
+#include <set>
+#include <string>
+#include <vector>
+#include <cpPlugins_Config.h>
+
+int main( int argc, char* argv[] )
+{
+ if( argc == 1 )
+ {
+ std::cout << "Usage: " << argv[ 0 ] << " workspace args" << std::endl;
+ return( 1 );
+
+ } // fi
+ std::set< std::string > parameters;
+ std::set< std::string > plugins;
+
+ // Read arguments
+ std::string ws_file = argv[ 1 ];
+ for( unsigned int i = 2; i < argc; ++i )
+ {
+ std::vector< std::string > tokens;
+ cpPlugins::TokenizeString( tokens, argv[ i ], "=" );
+ if( tokens.size( ) < 2 )
+ continue;
+ if ( tokens[ 0 ] == "pl" ) plugins.insert( tokens[ 1 ] );
+ else if( tokens[ 0 ] == "pa" ) parameters.insert( tokens[ 1 ] );
+
+ } // rof
+ return( 0 );
+}
+
+// eof - $RCSfile$
--- /dev/null
+#!/bin/bash
+
+## Some configuration variables
+number_of_processes="-j4"
+
+## Check input parameters and process inputs (if needed)
+if [ "$#" -eq 1 ]; then
+ valid_extensions=("zip" "tar" "tar.gz" "tar.bz2")
+ actual_ext=""
+ for ext in ${valid_extensions[@]}; do
+ if [ `basename $1 $ext` != $1 ]; then
+ actual_ext=$ext
+ fi
+ done
+ if [ "x$actual_ext" == "x" ]; then
+ echo "$0: Invalid file type."
+ exit 1
+ fi
+ canonical_path=`readlink -e $1`
+ source_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`
+ build_dir=`dirname $canonical_path`/`basename $1 .$actual_ext`-build
+ echo -n "Cleaning directories... "
+ rm -rf $source_dir
+ rm -rf $build_dir
+ echo "done."
+ echo -n "Creating directories... "
+ mkdir -p $source_dir
+ mkdir -p $build_dir
+ echo "done."
+ echo -n "Extracting sources... "
+ if [ "$actual_ext" == "zip" ]; then
+ echo unzip $canonical_path
+ elif [ "$actual_ext" == "tar" ]; then
+ tar xf $canonical_path -C $source_dir --strip-components=1
+ elif [ "$actual_ext" == "tar.gz" ]; then
+ tar xzf $canonical_path -C $source_dir --strip-components=1
+ elif [ "$actual_ext" == "tar.bz2" ]; then
+ tar xjf $canonical_path -C $source_dir --strip-components=1
+ else
+ echo "$0: Invalid file type."
+ exit 1
+ fi
+ echo "done!"
+elif [ "$#" -eq 2 ]; then
+ source_dir=`dirname $1`
+ build_dir=`dirname $2`
+else
+ echo "Usage: [cmake_package] or [cmake_source_dir cmake_build_dir]"
+fi
+
+echo "Given source dir : \"$source_dir\""
+echo "Given build dir : \"$build_dir\""
+
+echo "Configuring sources... "
+cd $build_dir
+$source_dir/bootstrap --prefix=${HOME}/local
+echo "Configuring sources... done."
+
+echo "Compiling sources..."
+cd $build_dir
+make $number_of_processes
+echo "Compiling sources... done."
+
+echo "Installing package..."
+cd $build_dir
+make -j install
+echo "Installing package... done."
+
+## eof - $RCSfile$
## Some configuration variables
number_of_processes="-j4"
+comp_type=Debug
## Locate cmake executable
cmake_exec="/usr/bin/cmake"
-DBUILD_EXAMPLES:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF \
- -DCMAKE_BUILD_TYPE:STRING=MinSizeRel \
+ -DCMAKE_BUILD_TYPE:STRING=$comp_type \
-DModule_ITKReview:BOOL=ON \
-DModule_ITKVtkGlue:BOOL=OFF \
-DCMAKE_INSTALL_PREFIX:PATH=${HOME}/local \
#!/bin/bash
+## Some configuration variables
+number_of_processes="-j4"
+comp_type=-debug-and-release
+# particular_options=-no-framework
+
## Check input parameters and process inputs (if needed)
if [ "$#" -eq 1 ]; then
valid_extensions=("zip" "tar" "tar.gz" "tar.bz2")
cd $build_dir
$source_dir/configure \
-prefix ${HOME}/local \
- -release -opensource -shared -fast -no-webkit \
- -optimized-qmake -no-framework \
- -confirm-license yes
+ $comp_type \
+ -opensource -shared -fast \
+ -no-phonon \
+ -no-phonon-backend \
+ -no-webkit \
+ -no-openvg \
+ -nomake demos -nomake examples \
+ -optimized-qmake \
+ $particular_options \
+ -confirm-license
echo "Configuring sources... done."
echo "Compiling sources..."
cd $build_dir
-make
+make $number_of_processes
echo "Compiling sources... done."
echo "Installing package..."
## Some configuration variables
number_of_processes="-j4"
+comp_type=Debug
## Locate cmake executable
cmake_exec="/usr/bin/cmake"
fi
## Locate qmake executable
-cmake_exec="/usr/bin/qmake"
-if [ ! -x $cmake_exec ]; then
- cmake_exec="/usr/local/bin/qmake"
-fi
-if [ ! -x $cmake_exec ]; then
- cmake_exec="${HOME}/local/bin/qmake"
-fi
-if [ ! -x $cmake_exec ]; then
- echo "$0: modify this script to put the correct location of qmake."
- exit 1
-fi
+qmake_dirs=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin")
+qmake_exec=""
+for dir in ${qmake_dirs[@]}; do
+ echo $dir
+done
+
+
+# qmake_exec="/usr/bin/qmake"
+# number="0"
+# if [ -x $qmake_exec ]; then
+# version=`$qmake_exec --version | grep Using\ Qt\ version`
+# number=`expr substr "$version" 18 1`
+# else
+# qmake_exec=""
+# fi
+# if [ "$number" -ne "4" ]; then
+# qmake_exec=""
+# fi
+# echo 1$qmake_exec
+
+# if [ "x$qmake_exec" != "x" ]; then
+# qmake_exec="/usr/local/bin/qmake"
+# if [ ! -x $qmake_exec ]; then
+# number="0"
+# if [ -x $qmake_exec ]; then
+# version=`$qmake_exec --version | grep Using\ Qt\ version`
+# number=`expr substr "$version" 18 1`
+# fi
+# if [ "$number" -ne "4" ]; then
+# qmake_exec=""
+# fi
+# else
+# qmake_exec=""
+# fi
+# else
+# qmake_exec=""
+# fi
+# if [ "x$qmake_exec" != "x" ]; then
+# qmake_exec="${HOME}/local/bin/qmake"
+# if [ ! -x $qmake_exec ]; then
+# number="0"
+# if [ -x $qmake_exec ]; then
+# version=`$qmake_exec --version | grep Using\ Qt\ version`
+# number=`expr substr "$version" 18 1`
+# fi
+# echo $number
+# if [ "$number" -ne "4" ]; then
+# qmake_exec=""
+# fi
+# else
+# qmake_exec=""
+# fi
+# else
+# qmake_exec=""
+# fi
+# if [ ! -x $qmake_exec ]; then
+# echo "$0: modify this script to put the correct location of qmake."
+# exit 1
+# fi
+# echo $qmake_exec
+
+exit 1
## Check input parameters and process inputs (if needed)
if [ "$#" -eq 1 ]; then
-DBUILD_EXAMPLES:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DBUILD_TESTING:BOOL=OFF \
- -DCMAKE_BUILD_TYPE:STRING=MinSizeRel \
+ -DQT_QMAKE_EXECUTABLE:PATH=$qmake_exec \
+ -DCMAKE_BUILD_TYPE:STRING=$comp_type \
-DModule_vtkGUISupportQt:BOOL=ON \
-DModule_vtkGUISupportQtOpenGL:BOOL=ON \
-DModule_vtkGUISupportQtSQL:BOOL=OFF \