Commit e71fb931 authored by Christoph Wick's avatar Christoph Wick

Support for snap build

parent 65a47fd1
......@@ -436,7 +436,7 @@ contains(EPT_CONFIG, install) {
application.path = $$EPT_INSTALL_DATA_DIR/applications
application.files += $$EPT_APPSTORE_DIR/installer/scripts/entropypianotuner.desktop
!contains(EPT_THIRDPARTY_CONFIG, system_qwt):!contains(EPT_CONFIG, static_qwt) {
!contains(EPT_THIRDPARTY_CONFIG, system_qwt):!contains(EPT_THIRDPARTY_CONFIG, static_qwt) {
# install target for qwt
qwtinstall.path = $$EPT_INSTALL_LIB_DIR/entropypianotuner
......
/*****************************************************************************
* Copyright 2018 Haye Hinrichsen, Christoph Wick
*
* This file is part of Entropy Piano Tuner.
*
* Entropy Piano Tuner is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* Entropy Piano Tuner is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* Entropy Piano Tuner. If not, see http://www.gnu.org/licenses/.
*****************************************************************************/
#include <QtMidi>
int main() {return 1;}
QT += widgets midi
CONFIG += qt
SOURCES += main.cpp
......@@ -63,10 +63,13 @@ win|linux:!android {
qtCompileTest(qwt6-qt5_exists) {
EPT_THIRDPARTY_CONFIG+=system_qwt
}
!qtCompileTest(qtmidi_exists) {
error(QtMidi not found)
}
packagesExist(qwt): EPT_THIRDPARTY_CONFIG+=system_qwt
packagesExist(fftw3): EPT_THIRDPARTY_CONFIG+=system_fftw3
packagesExist(libuv): EPT_THIRDPARTY_CONFIG+=system_libuv
packagesExist(qwt): EPT_THIRDPARTY_CONFIG+=system_qwt
packagesExist(fftw3): EPT_THIRDPARTY_CONFIG+=system_fftw3
packagesExist(libuv): EPT_THIRDPARTY_CONFIG+=system_libuv
}
include($$PWD/entropypianotuner_static_config.pri)
......@@ -195,18 +195,17 @@ defineReplace(depends_qwt) {
LIBS += -F$$EPT_ROOT_OUT_DIR/thirdparty/qwt-lib -framework qwt
} else:android {
LIBS += -lqwt
ANDROID_EXTRA_LIBS += \
$$[QT_INSTALL_LIBS]/libQt5OpenGL.so \
$$EPT_ROOT_OUT_DIR/thirdparty/qwt-lib/libqwt.so
ANDROID_EXTRA_LIBS += $$[QT_INSTALL_LIBS]/libQt5OpenGL.so
!contains(EPT_THIRDPARTY_CONFIG, static_qwt):$$EPT_ROOT_OUT_DIR/thirdparty/qwt-lib/libqwt.so
} else:!contains(EPT_THIRDPARTY_CONFIG, system_qwt) {
LIBS += -lqwt
DLLS += "$$EPT_ROOT_OUT_DIR/thirdparty/qwt-lib/libqwt.so*"
!contains(EPT_THIRDPARTY_CONFIG, static_qwt):DLLS += "$$EPT_ROOT_OUT_DIR/thirdparty/qwt-lib/libqwt.so*"
} else {
LIBS += -lqwt-qt5
}
DEFINES += QWT_DLL
!contains(EPT_THIRDPARTY_LIBS, static_qwt):DEFINES += QWT_DLL
export(INCLUDEPATH)
export(LIBS)
......
......@@ -5,12 +5,20 @@ else:return()
#------------------------------------------------
# Global config
# check if it is a snap build (check if any variable is defined)
EPT_SNAP_BUILD = $$(SNAP)$$(SNAPCRAFT_PART_INSTALL)
!isEmpty(EPT_SNAP_BUILD):EPT_CONFIG += snap_build static
# include example algorithm by default in debug builds
# on mobile platforms and mac/ios use static algorithm build
android|ios|winrt|winphone|macx: EPT_CONFIG += no_shared_algorithms static_algorithms static_core no_shared_core
else: EPT_CONFIG += shared_algorithms no_static_algorithms shared_core no_static_core
android|ios|winrt|winphone|macx:EPT_CONFIG += static
contains(EPT_CONFIG, static) {
EPT_CONFIG += no_shared_algorithms static_algorithms static_core no_shared_core
}
else {
EPT_CONFIG += shared_algorithms no_static_algorithms shared_core no_static_core
}
# add install rules
winrt|winphone: EPT_CONFIG += no_install
......@@ -42,7 +50,7 @@ win32:contains(EPT_CONFIG, shared_core) {
}
# qwt
ios: EPT_CONFIG += static_qwt
contains(EPT_CONFIG, static)|ios: EPT_THIRDPARTY_CONFIG += static_qwt
#--------------------------------------------------
# global settings
......@@ -58,7 +66,7 @@ contains(EPT_CONFIG, no_shared_algorithms):DEFINES+="EPT_NO_SHARED_ALGORITHMS=1"
contains(EPT_CONFIG, shared_algorithms):DEFINES+="EPT_SHARED_ALGORITHMS=1"
# set QWT_CONFIG for static/dynamic build
contains(EPT_CONFIG, static_qwt):QWT_CONFIG += QwtStatic
contains(EPT_THIRDPARTY_CONFIG, static_qwt):QWT_CONFIG += QwtStatic
else:QWT_CONFIG += QwtDll
contains(EPT_CONFIG, static_core):DEFINES += EPT_STATIC_CORE
......
Subproject commit a3e9c67ac46344cefd1667a918ccdf6539f61146
Subproject commit c778d34abbfe7e2d28f4b493f61ef9b8ec17cb84
Subproject commit e0c19a5218a5e45a7a0a5237392d3abf626b17cb
Subproject commit a52bf6b3ff0071afc5ee62409f06d1579de101a7
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