Fix taglib include path for meson subproject and update README for dependencies.
This commit is contained in:
parent
79cb16324a
commit
dd5b5196ee
|
|
@ -48,18 +48,18 @@ SampleHive let's you manage your audio samples in a nice and simple way, just ad
|
|||
On Arch based distributions,
|
||||
|
||||
#+begin_example
|
||||
sudo pacman -S wxgtk3 wxsvg sqlite taglib yaml-cpp
|
||||
sudo pacman -S wxgtk3 wxsvg sqlite taglib yaml-cpp libsndfile
|
||||
#+end_example
|
||||
|
||||
On Debian, Ubuntu and distributions based the on two,
|
||||
|
||||
#+begin_example
|
||||
sudo apt install libwxbase3.0-dev libwxgtk-media3.0-gtk3-dev libwxgtk3.0-gtk3-dev wx3.0-headers libsqlite3-dev libyaml-cpp-dev libtagc0-dev libtag1-dev libtagc0 libexif-dev libpango1.0-dev
|
||||
sudo apt install libwxbase3.0-dev libwxgtk-media3.0-gtk3-dev libwxgtk3.0-gtk3-dev wx3.0-headers libsqlite3-dev libyaml-cpp-dev libtagc0-dev libtag1-dev libtagc0 libexif-dev libpango1.0-dev libsndfile1-dev libgstreamer-plugins-base1.0-dev libstreamer-plugins-bad1.0-dev
|
||||
#+end_example
|
||||
|
||||
You might also need to install =git=, =meson= and =g++= as well, if you don't already have them installed in order to build SampleHive.
|
||||
You might also need to install =git=, =cmake=, =meson= and =g++= as well, if you don't already have them installed in order to build SampleHive.
|
||||
|
||||
/NOTE:/ On Debian and Debian based distributions you also have to install =libwxgtk-media3.0-dev=
|
||||
*NOTE:* On Debian and Debian based distributions you also have to install =libwxgtk-media3.0-dev=
|
||||
|
||||
** How to build SampleHive?
|
||||
:PROPERTIES:
|
||||
|
|
|
|||
54
meson.build
54
meson.build
|
|
@ -42,17 +42,39 @@ config_data.set_quoted('LIBDIR', libdir)
|
|||
config_data.set_quoted('DATADIR', datadir)
|
||||
config_data.set_quoted('SAMPLEHIVE_DATADIR', samplehive_datadir)
|
||||
|
||||
# Create samplehive-config.h based on configuration
|
||||
config_h = configure_file(output: 'SampleHiveConfig.hpp',
|
||||
configuration: config_data,)
|
||||
|
||||
# Import CMake
|
||||
cmake = import('cmake')
|
||||
cmake_opts = cmake.subproject_options()
|
||||
cmake_opts.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
|
||||
'CMAKE_INSTALL_PREFIX': prefix,
|
||||
'CMAKE_BUILD_TYPE': 'Release',
|
||||
'CMAKE_CXX_COMPILER': 'g++'})
|
||||
|
||||
wx_opts = cmake.subproject_options()
|
||||
wx_opts.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
|
||||
'CMAKE_INSTALL_PREFIX': prefix,
|
||||
'CMAKE_BUILD_TYPE': 'Release',
|
||||
'CMAKE_CXX_COMPILER': 'g++',
|
||||
'wxBUILD_SHARED': 'ON',
|
||||
'wxBUILD_TESTS': 'OFF',
|
||||
'wxBUILD_SAMPLES': 'OFF',
|
||||
'wxBUILD_DEMOS': 'OFF',
|
||||
'wxBUILD_COMPATIBILITY': '3.0',
|
||||
'wxUSE_UNICODE': 'ON',
|
||||
'wxUSE_AUI': 'OFF',
|
||||
'wxUSE_XML': 'OFF',
|
||||
'wxUSE_XRC': 'ON',
|
||||
'wxUSE_HTML': 'ON',
|
||||
'wxUSE_QA': 'ON',
|
||||
'wxUSE_PROPGRID': 'OFF',
|
||||
'wxUSE_RIBBON': 'OFF',
|
||||
'wxUSE_MDI': 'OFF',
|
||||
'wxUSE_MDI_ARCHITECTURE': 'OFF',
|
||||
'wxUSE_RICHTEXT': 'OFF',
|
||||
'wxUSE_WEBVIEW': 'OFF',
|
||||
'wxUSE_LIBSDL': 'ON',
|
||||
'wxUSE_MEDIACTRL': 'ON'})
|
||||
|
||||
taglib_opts = cmake.subproject_options()
|
||||
taglib_opts.add_cmake_defines({'CMAKE_POSITION_INDEPENDENT_CODE': 'ON',
|
||||
'CMAKE_INSTALL_PREFIX': prefix,
|
||||
'CMAKE_BUILD_TYPE': 'Release',
|
||||
'CMAKE_CXX_COMPILER': 'g++'})
|
||||
|
||||
# Source files to be compiled
|
||||
src = [
|
||||
|
|
@ -78,9 +100,9 @@ wx_found = false
|
|||
if not wx.found()
|
||||
wx_found = false
|
||||
|
||||
wx_subproject = cmake.subproject('wxwidgets', options: cmake_opts)
|
||||
wx_core = wx_subproject.dependency('wxcore')
|
||||
wx_subproject = cmake.subproject('wxwidgets', options: wx_opts)
|
||||
wx_base = wx_subproject.dependency('wxbase')
|
||||
wx_core = wx_subproject.dependency('wxcore')
|
||||
wx_media = wx_subproject.dependency('wxmedia')
|
||||
wx = [wx_core, wx_base, wx_media]
|
||||
else
|
||||
|
|
@ -98,15 +120,22 @@ else
|
|||
endif
|
||||
|
||||
taglib = dependency('taglib', version: '>=1.12', required: false)
|
||||
|
||||
if not taglib.found()
|
||||
taglib_subproject = cmake.subproject('taglib', options: cmake_opts)
|
||||
taglib_subproject = cmake.subproject('taglib', options: taglib_opts)
|
||||
taglib = taglib_subproject.dependency('tag')
|
||||
else
|
||||
config_data.set('USE_SYSTEM_INCLUDE_PATH', 1)
|
||||
endif
|
||||
|
||||
sqlite3 = dependency('sqlite3', required: true)
|
||||
yaml = dependency('yaml-cpp', required: true)
|
||||
snd = dependency('sndfile', required: true)
|
||||
|
||||
# Create samplehive-config.h based on configuration
|
||||
config_h = configure_file(output: 'SampleHiveConfig.hpp',
|
||||
configuration: config_data,)
|
||||
|
||||
install_subdir('assets',
|
||||
install_dir: samplehive_datadir,
|
||||
exclude_directories: 'screenshots')
|
||||
|
|
@ -129,7 +158,6 @@ endif
|
|||
|
||||
summary(
|
||||
{
|
||||
# 'Program name': get_option ('program_name'),
|
||||
'Debug': get_option('debug'),
|
||||
'Optimization': get_option('optimization'),
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "WaveformViewer.hpp"
|
||||
#include "SampleHiveConfig.hpp"
|
||||
#include "SH_Event.hpp"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <wx/button.h>
|
||||
|
|
@ -55,10 +59,12 @@
|
|||
|
||||
#include <taglib/tag.h>
|
||||
#include <taglib/fileref.h>
|
||||
#include <taglib/toolkit/tstring.h>
|
||||
|
||||
#include "WaveformViewer.hpp"
|
||||
#include "SH_Event.hpp"
|
||||
#ifndef USE_SYSTEM_INCLUDE_PATH
|
||||
#include <taglib/toolkit/tstring.h>
|
||||
#else
|
||||
#include <taglib/tstring.h>
|
||||
#endif
|
||||
|
||||
struct FileInfo
|
||||
{
|
||||
|
|
|
|||
10
src/Tags.cpp
10
src/Tags.cpp
|
|
@ -18,11 +18,17 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "Tags.hpp"
|
||||
#include "SampleHiveConfig.hpp"
|
||||
|
||||
#include <taglib/tag.h>
|
||||
#include <taglib/fileref.h>
|
||||
#include <taglib/toolkit/tstring.h>
|
||||
|
||||
#include "Tags.hpp"
|
||||
#ifndef USE_SYSTEM_INCLUDE_PATH
|
||||
#include <taglib/toolkit/tstring.h>
|
||||
#else
|
||||
#include <taglib/tstring.h>
|
||||
#endif
|
||||
|
||||
Tags::Tags(const std::string& filename)
|
||||
: m_Filepath(filename)
|
||||
|
|
|
|||
Loading…
Reference in New Issue