root/branch/3.3.0/generate_kdevelop_project

Revision 552, 1.8 kB (checked in by mswat, 4 years ago)
Line 
1
2#!/bin/bash
3
4function usage
5{
6    # Temporary function stub
7    echo "USAGE: ./generate_kdevelop_project -i <directory where CompuCell will be installed> -d <directory where kdevelop project will be writen to> -t <build type: Debug|Release>"
8}
9
10export source_dir=${PWD}
11
12export install_path
13export build_type=Release
14
15export kdevelop_project_path=${source_dir}/kdevelop_project
16
17#export source_dir
18
19while [ "$1" != "" ]; do
20    case $1 in
21        -i | --install_path )           shift
22                                install_path=$1
23                                echo "install_path: $install_path"
24                                ;;
25
26        -d | --kdevelop_project_path )           shift
27                                kdevelop_project_path=$1
28                                echo "kdevelop_project_path: $kdevelop_project_path"
29                                ;;
30
31        -t | --build_type )           shift
32                                build_type=$1
33                                echo "build_type: $build_type"
34                                ;;
35
36
37
38        -h | --help )           usage
39                                exit
40                                ;;
41        * )                     usage
42                                exit 1
43    esac
44    shift
45done
46
47
48if [ -w $install_path ]
49then
50    echo "Everything seems to be OK permission wise"
51else
52    if mkdir $install_path; then
53        echo "Successfully created installation directory: $install_path"
54        mkdir $install_path/cmake_binary_dir
55    else
56        echo "Could not create directory $install_path. Check if you have right permissions"
57        exit 1
58    fi
59
60fi
61
62echo "will generate kdevelop file in ${kdevelop_project_path}"
63
64mkdir ${kdevelop_project_path}
65cd ${kdevelop_project_path}
66cmake -GKDevelop3 -DCMAKE_INSTALL_PREFIX:STRING=$install_path -DCMAKE_BUILD_TYPE:STRING=$build_type ${source_dir};
67
68exit 0
69
Note: See TracBrowser for help on using the browser.