1
0
Fork 0
mirror of https://github.com/HenkKalkwater/harbour-sailfin.git synced 2024-11-22 01:05:17 +00:00

Add BlurHash library

This commit is contained in:
Chris Josten 2021-01-14 17:43:42 +01:00
parent 80cbf56225
commit bb2f6f3a3e
5 changed files with 14 additions and 4 deletions

View file

@ -5,7 +5,7 @@ set(sailfin_SOURCES
add_executable(sailfin ${sailfin_SOURCES}) add_executable(sailfin ${sailfin_SOURCES})
target_link_libraries(sailfin PUBLIC Qt5::Gui Qt5::Qml Qt5::Quick jellyfin-qt) target_link_libraries(sailfin PUBLIC Qt5::Gui Qt5::Qml Qt5::Quick jellyfin-qt)
install(TARGETS harbour-sailfin install(TARGETS sailfin
RUNTIME DESTINATION bin RUNTIME DESTINATION bin
) )

View file

@ -4,7 +4,7 @@
# generate changelog from well formatted Git commit messages and tag # generate changelog from well formatted Git commit messages and tag
# annotations. # annotations.
git-change-log git-change-log --dense '/[0-9]+.[0-9]+$'
# Here are some basic examples how to change from the default behavior. Run # Here are some basic examples how to change from the default behavior. Run
# git-change-log --help inside the Sailfish OS SDK chroot or build engine to # git-change-log --help inside the Sailfish OS SDK chroot or build engine to

View file

@ -44,11 +44,16 @@ Files:
Macros: Macros:
- '__provides_exclude_from; ^%{_datadir}/.*$' - '__provides_exclude_from; ^%{_datadir}/.*$'
- '__requires_exclude; ^libjellyfin-qt.*$' - '__requires_exclude; ^libjellyfin-qt.*$'
# Turn off facist build policy
- '_unpackaged_files_terminate_build; 0 '
ConfigOptions: ConfigOptions:
- -DCMAKE_BUILD_TYPE=Release - -DCMAKE_BUILD_TYPE=Release
- -DSAILFISHOS=1 - -DSAILFISHOS=1
- -DSAILFIN_VERSION='%{version}-%{release}' - -DSAILFIN_VERSION='%{version}-%{release}'
# ExtraInstall: |
# mv /home/deploy/installroot/home/deploy/installroot/usr/share/harbour-sailfin/plugins /home/deploy/installroot/usr/share/harbour-sailfin/plugins
# For more information about yaml and what's supported in Sailfish OS # For more information about yaml and what's supported in Sailfish OS
# build system, please see https://wiki.merproject.org/wiki/Spectacle # build system, please see https://wiki.merproject.org/wiki/Spectacle

View file

@ -7,9 +7,10 @@ set(DEPLOY_ROOT /home/deploy/installroot/)
ExternalProject_Add(BlurhashQt ExternalProject_Add(BlurhashQt
# PREFIX ${CMAKE_CURRENT_BINARY_DIR}/lib/blurhash-qt # PREFIX ${CMAKE_CURRENT_BINARY_DIR}/lib/blurhash-qt
GIT_REPOSITORY https://github.com/HenkKalkwater/BlurhashQt.git GIT_REPOSITORY https://github.com/HenkKalkwater/BlurhashQt.git
GIT_TAG 6a0d05919a798eedeacdbc30507470b774b90f8d GIT_TAG 61ae7f0feca6ab67da1bfdbcb222bbd12e8f7e07
CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=ON -DENABLE_EXPORT=OFF -DQML_PLUGIN_PATH=${PROJECT_BINARY_DIR}/plugins/)
CMAKE_ARGS -DBUILD_SHARED_LIBS:BOOL=ON -DENABLE_EXPORT=OFF -DCMAKE_INSTALL_LIBDIR=${DEPLOY_ROOT}usr/share/harbour-sailfin/plugins)
find_package(Qt5 COMPONENTS Gui Qml Quick) find_package(Qt5 COMPONENTS Gui Qml Quick)
find_package(SailfishApp 1.0 REQUIRED) find_package(SailfishApp 1.0 REQUIRED)
@ -66,6 +67,8 @@ target_link_libraries(harbour-sailfin PRIVATE Qt5::Gui Qt5::Qml Qt5::Quick Sailf
install(TARGETS harbour-sailfin install(TARGETS harbour-sailfin
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(DIRECTORY ${PROJECT_BINARY_DIR}/plugins/
DESTINATION share/harbour-sailfin/)
install(DIRECTORY qml install(DIRECTORY qml
DESTINATION share/harbour-sailfin DESTINATION share/harbour-sailfin
) )

View file

@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#include <QtQuick> #include <QtQuick>
#endif #endif
#include <QDebug>
#include <QJSEngine> #include <QJSEngine>
#include <QGuiApplication> #include <QGuiApplication>
#include <QQuickView> #include <QQuickView>
@ -45,6 +46,7 @@ int main(int argc, char *argv[]) {
QQuickView *view = SailfishApp::createView(); QQuickView *view = SailfishApp::createView();
view->setSource(SailfishApp::pathToMainQml()); view->setSource(SailfishApp::pathToMainQml());
view->show(); view->show();
qDebug() << "QML import paths: " << view->engine()->importPathList();
return app->exec(); return app->exec();
} }