Skip to content

Commit 3f8e48b

Browse files
author
hekra
committed
add headers to linux dist
1 parent 370a95d commit 3f8e48b

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

build.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ platform=$2
44
mode=$3
55
qt_dir=$4
66

7-
current_dir=`pwd`
7+
root_dir=`pwd`
88
if [ -z $output_gen ];
99
then
1010
output_gen=`pwd`/out
@@ -39,31 +39,34 @@ for platform in $platforms
3939
do
4040
for mode in $modes
4141
do
42-
cd $current_dir
42+
cd $root_dir
4343

4444
OUTPUT_DIR=${output_gen}/$platform/$mode
45-
OUTPUT_DIR_OUT=${output_gen}/$platform/$mode/Default
46-
OUTPUT_BIN_DIR=${output_gen}/bin/$platform/$mode
45+
OUTPUT_DIR_OUT=${OUTPUT_DIR}/Default
46+
DIST_DIR=${output_gen}/dist/$platform/$mode
4747

4848
python $GYP --depth . -G output_dir=. -D platform=$platform -D mode=$mode -D ROOT_PATH=${base_output_gen} -D QT_DIR=${qt_dir} --generator-output=${output_gen}/$platform/$mode wd.gyp
4949
[ $? -ne 0 ] && exit 1
5050
cd $OUTPUT_DIR
5151
[ $? -ne 0 ] && echo "**** ERROR: Can't access to $OUTPUT_DIR" && exit 1
5252
make
5353
[ $? -ne 0 ] && exit 1
54-
mkdir -p ${output_gen}/bin/$platform/$mode/
55-
[ $? -ne 0 ] && echo "**** ERROR: Can't create $OUTPUT_BIN_DIR" && exit 1
54+
mkdir -p ${DIST_DIR}/{bin,libs,h}
55+
[ $? -ne 0 ] && echo "**** ERROR: Can't create $DIST_DIR" && exit 1
5656

5757
# copy libraries
58-
for file in $OUT_STATIC_LIB_FILES; do cp -f $OUTPUT_DIR_OUT/$file $OUTPUT_BIN_DIR 2>/dev/null; done
59-
for file in $OUT_SHARED_LIB_FILES; do cp -f $OUTPUT_DIR_OUT/lib.target/$file $OUTPUT_BIN_DIR 2>/dev/null; done
58+
for file in $OUT_STATIC_LIB_FILES; do cp -f $OUTPUT_DIR_OUT/$file $DIST_DIR/libs 2>/dev/null; done
59+
for file in $OUT_SHARED_LIB_FILES; do cp -f $OUTPUT_DIR_OUT/lib.target/$file $DIST_DIR/libs 2>/dev/null; done
60+
61+
# copy headers
62+
cp -rf $root_dir/inc/* $DIST_DIR/h 2>/dev/null;
6063

6164
# copy test binaries
6265
for file in $OUT_BIN_FILES
6366
do
6467
if [ -f $OUTPUT_DIR_OUT/$file ]
6568
then
66-
cp -f $OUTPUT_DIR_OUT/$file $OUTPUT_BIN_DIR 2>/dev/null
69+
cp -f $OUTPUT_DIR_OUT/$file $DIST_DIR/bin 2>/dev/null
6770
fi
6871
done
6972

0 commit comments

Comments
 (0)