File tree Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Expand file tree Collapse file tree 2 files changed +49
-1
lines changed Original file line number Diff line number Diff line change @@ -58,11 +58,21 @@ class CppHeaderCrawler
58
58
};
59
59
60
60
61
+ void usage (char * appname)
62
+ {
63
+ cout<<" \n Usage: " << appname << " <path/to/OSSIM_BUILD_DIR> <path-to-output-dir>\n " << endl;
64
+ cout<<" Utility app to copy all external header files on a system that are referenced by the \n "
65
+ <<" OSSIM build. The headers are copied into a \" sandbox\" directory (usually appended with \n "
66
+ <<" \" include\" ), preserving namespaces. This is to enable sandbox builds. See the script in\n "
67
+ <<" ossim/scripts/ocpld.sh for copying the external libraries needed.\n " <<endl;
68
+ return ;
69
+ }
70
+
61
71
int main (int argc, char ** argv)
62
72
{
63
73
if (argc < 3 )
64
74
{
65
- cout << " \n Usage: " << argv[0 ] << " <path/to/OSSIM_BUILD_DIR> <path-to-output-dir> \n " << endl ;
75
+ usage ( argv[0 ]) ;
66
76
return 1 ;
67
77
}
68
78
@@ -286,6 +296,7 @@ bool CppHeaderCrawler::copyHeaders(const ossimFilename& outputDir)
286
296
existingLocation.copyFileTo (newLocation);
287
297
cout << " Copied <" << header.first << " >" << endl;
288
298
}
299
+ return true ;
289
300
}
290
301
291
302
ossimFilename CppHeaderCrawler::findPath (const ossimFilename &file)
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # OCPLD -- Ossim CoPy Library Dependencies
4
+ # Adapted from code written by Hemanth.HM
5
+
6
+ # Uncomment to step/debug
7
+ # set -x; trap read debug
8
+ pushd ` dirname ${BASH_SOURCE[0]} ` > /dev/null
9
+ export SCRIPT_DIR=` pwd -P`
10
+ popd > /dev/null
11
+
12
+ if [ $# -ne 2 ]
13
+ then
14
+ echo " Usage: ` basename $0 ` <ossim_build_dir> <sandbox_dir>"
15
+ exit 1
16
+ fi
17
+
18
+ OSSIM_BUILD_DIR=$1
19
+ SANDBOX_DIR=$2
20
+
21
+ echo " Copying libraries..."
22
+ $SCRIPT_DIR /ocpld.sh $OSSIM_BUILD_DIR /lib $SANDBOX_DIR /lib
23
+ if [ $? -ne 0 ]; then
24
+ echo ; echo " Error encountered during ocpld."
25
+ popd> /dev/null
26
+ exit 1
27
+ fi
28
+
29
+ echo " Copying headers..."
30
+ ossim-header-crawl $OSSIM_BUILD_DIR $SANDBOX_DIR /include
31
+ if [ $? -ne 0 ]; then
32
+ echo ; echo " Error encountered during ossim-header-crawl."
33
+ popd> /dev/null
34
+ exit 1
35
+ fi
36
+
37
+ echo ; echo " Sandbox of dependencies has been successfully created in $SANDBOX_DIR ." ; echo
You can’t perform that action at this time.
0 commit comments