In case of cmake enforce an out-of-tree build 51/14751/2
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 27 Jun 2018 17:56:31 +0000 (19:56 +0200)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Wed, 27 Jun 2018 22:31:57 +0000 (00:31 +0200)
This fixes a build error with newer app templates if no autobuild script is found.

Change-Id: Iad3ea26ddd8cd3f680f8788cd08b8d2a374e8dc5
Bug-AGL: SPEC-1534
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/common/include-apps-build-app.sh
jjb/common/include-apps-prepare-upload-folder-merged.sh
jjb/common/include-apps-prepare-upload-folder.sh

index cd74258..a662630 100644 (file)
@@ -80,9 +80,13 @@ if [[ ! x"yes" = x"$HANDLED" ]] && $(echo "$TARGETPROJECT" | grep -q "apps/"); t
             export DONE=1
         fi
         if test x"0" = x"$DONE" -a -f CMakeLists.txt; then
-            cmake .
+            rm -rf build || true
+            mkdir build
+            pushd build
+            cmake ../
             make
             make package || true
+            popd
             export DONE=1
         fi
         if test x"0" = x"$DONE" -a -f Makefile ; then
index 222e921..ced33d2 100644 (file)
@@ -42,9 +42,15 @@ export DEST=$(pwd)/UPLOAD/${PROJECTPATTERN}
 
 # copy the wgt to the upload folder
 pushd ${MYPROJECT}
-  pwd
-  ls -alh || true
+pwd
+if test -d build/package ; then
+  # use cmake build/package folder for wgt's ...
+  ls build/package/ || true
+  cp build/package/*.wgt $DEST
+else
+  # use just ./package/ for wgt's
   ls package || true
   cp package/*.wgt $DEST
-  ls -alh $DEST
+fi
 popd
+
index e883e61..dc2f8bf 100644 (file)
@@ -23,14 +23,19 @@ fi
 
 pushd ${MYPROJECT}
 pwd
-
 ls -alh
 
-ls
+if test -d build/package ; then
+  # use cmake build/package folder for wgt's ...
+  ls build/package/ || true
+  cp build/package/*.wgt $DEST
+else
+  # use just ./package/ for wgt's
+  ls package || true
+  cp package/*.wgt $DEST
+fi
 
-ls package || true
 
-cp package/*.wgt $DEST
 ls -alh $DEST
 
 popd