Commit 092bfa69 authored by Alberto Mardegan's avatar Alberto Mardegan Committed by Alberto Mardegan

CI: build opencv and exiv2 statically

This reduces the size of the resulting AppImage, because we include only
those compilation units we use.
parent d6985343
...@@ -58,13 +58,15 @@ build_dependencies: ...@@ -58,13 +58,15 @@ build_dependencies:
-DCMAKE_INSTALL_PREFIX=$STAGING \ -DCMAKE_INSTALL_PREFIX=$STAGING \
-DEXIV2_BUILD_SAMPLES=OFF \ -DEXIV2_BUILD_SAMPLES=OFF \
-DEXIV2_BUILD_EXIV2_COMMAND=OFF \ -DEXIV2_BUILD_EXIV2_COMMAND=OFF \
-DCMAKE_CXX_FLAGS="-static-libgcc -static-libstdc++" \ -DBUILD_SHARED_LIBS=OFF \
.. ..
- make install - make install
# Workaround for https://github.com/Exiv2/exiv2/issues/636 # Workaround for https://github.com/Exiv2/exiv2/issues/636
- echo '#include "exiv2lib_export.h"' > tmp_header - echo '#include "exiv2lib_export.h"' > tmp_header
- cat $STAGING/include/exiv2/convert.hpp >> tmp_header - cat $STAGING/include/exiv2/convert.hpp >> tmp_header
- mv tmp_header $STAGING/include/exiv2/convert.hpp - mv tmp_header $STAGING/include/exiv2/convert.hpp
# Fix the pkg-config file
- sed -ie "s,^\(Libs:.*\),\1 -lxmp -lexpat -lz -ldl," $STAGING/lib/pkgconfig/exiv2.pc
# Build libdbus # Build libdbus
- DBUS_VERSION="1.12.12" - DBUS_VERSION="1.12.12"
...@@ -128,6 +130,7 @@ build_dependencies: ...@@ -128,6 +130,7 @@ build_dependencies:
-DWITH_OPENEXR=OFF \ -DWITH_OPENEXR=OFF \
-DWITH_PVAPI=OFF \ -DWITH_PVAPI=OFF \
-DWITH_V4L=OFF \ -DWITH_V4L=OFF \
-DBUILD_SHARED_LIBS=OFF \
.. ..
- make -j8 - make -j8
- make install - make install
...@@ -223,7 +226,6 @@ appimage: ...@@ -223,7 +226,6 @@ appimage:
- cd staging - cd staging
- cp -a --parents usr/bin/ usr/share/ $APPDIR - cp -a --parents usr/bin/ usr/share/ $APPDIR
- mkdir -p $APPDIR/usr/lib - mkdir -p $APPDIR/usr/lib
- cp -a lib/*.so.* $APPDIR/usr/lib/
- cp usr/lib/libdbus-1.so.3 $APPDIR/usr/lib # not to use the system one - cp usr/lib/libdbus-1.so.3 $APPDIR/usr/lib # not to use the system one
- cd .. - cd ..
# Run linuxdeployqt # Run linuxdeployqt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment