Skip to content

Commit

Permalink
meson: Build as subproject; use wrap file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lord-Kamina authored and Baklap4 committed Sep 10, 2021
1 parent 03cf223 commit a423a7d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
10 changes: 3 additions & 7 deletions .semaphore/semaphore.yml
Expand Up @@ -16,7 +16,7 @@ blocks:
commands:
- echo "Installing Performous dependencies..."
- sudo apt -y update
- sudo apt-get install apt-transport-https ca-certificates gnupg software-properties-common wget
- sudo apt-get install --no-install-recommends apt-transport-https ca-certificates gnupg software-properties-common wget
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /etc/apt/trusted.gpg.d/kitware.gpg >/dev/null
- sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
- sudo add-apt-repository -y ppa:litenstein/focal-backports
Expand Down Expand Up @@ -116,11 +116,7 @@ blocks:
- echo "Installing Performous dependencies..."
- sudo add-apt-repository -y ppa:litenstein/focal-backports
- sudo apt-get update -y
- sudo apt-get install -y ninja-build
- sudo apt-get install -y ninja-build gettext clang-9 gcc-8 g++-8 python3-dev python3-pip
- sudo apt-get install -y libepoxy-dev libsdl2-dev libcairo2-dev libpango1.0-dev librsvg2-dev libboost-iostreams-dev libboost-locale-dev libboost-system-dev libboost-program-options-dev libavcodec-dev libavformat-dev libswscale-dev libswresample-dev libpng-dev libjpeg-dev libxml++2.6-dev portaudio19-dev libicu-dev libopencv-dev libportmidi-dev libglm-dev libaubio-dev libcpprest-dev
- sem-version python 3.9
- sudo pip3 install meson
- sudo apt-get install -y --no-install-recommends ninja-build gettext clang-12 gcc-11 g++-11 libepoxy-dev libsdl2-dev libcairo2-dev libpango1.0-dev librsvg2-dev libboost-iostreams-dev libboost-locale-dev libboost-system-dev libboost-program-options-dev libavcodec-dev libavformat-dev libswscale-dev libswresample-dev libpng-dev libjpeg-dev libxml++3.2-dev portaudio19-dev libicu-dev libopencv-dev libportmidi-dev libglm-dev libaubio-dev libcpprest-dev meson
- echo "Checking out..."
- checkout
- git clone --depth 1 https://github.com/google/compact_enc_det.git 3rdparty/ced
Expand All @@ -135,7 +131,7 @@ blocks:
value: g++-11
commands:
- echo "Setting up build..."
- meson setup --buildtype=plain build.gcc -Dusewebcam=true -Dusemididrum=true -Dusewebserver=true -Dstoponwarning=true
- meson setup --buildtype=plain build.gcc -Dusewebcam=true -Dusemididrum=true -Dusewebserver=true -Dwarningaserror=true
- echo "Building..."
- meson compile -C build.gcc
- name: Clang-12.0.1 Build
Expand Down
15 changes: 8 additions & 7 deletions meson.build
Expand Up @@ -6,6 +6,9 @@ project('performous',
meson_version: '>=0.53.0',
license: 'GPL-2.0-or-later')

compact_enc_det = subproject('ced')
compact_enc_det_dep = compact_enc_det.get_variable('compact_enc_det_dep')

# Print project summary. Limited to strict minimum for now
summary({'Use Webcam': get_option('usewebcam'),
'Use Midi Drum': get_option('usemididrum'),
Expand Down Expand Up @@ -194,6 +197,7 @@ endif
configure_file(input: 'game/config.hh.in', output: 'config.hh', configuration: conf)

dependencies = [
compact_enc_det_dep,
dependency('pangocairo', cmake_module_path: './cmake/Modules'),
dependency('sdl2', cmake_module_path: './cmake/Modules'),
dependency('aubio'),
Expand All @@ -218,13 +222,10 @@ dependencies = [
libxmlpp,
opencv,
portmidi,
cpprest]
cpprest
]

executable('performous', [
'3rdparty/ced/compact_enc_det/compact_enc_det.cc',
'3rdparty/ced/compact_enc_det/compact_enc_det_hint_code.cc',
'3rdparty/ced/util/encodings/encodings.cc',
'3rdparty/ced/util/languages/languages.cc',
'game/3dobject.cc',
'game/audio.cc',
'game/backgrounds.cc',
Expand Down Expand Up @@ -295,7 +296,6 @@ executable('performous', [
'game/webcam.cc',
'game/webserver.cc'],
dependencies: dependencies,
include_directories: include_directories('3rdparty/ced'),
cpp_args: compiler_args,
install: true
)
Expand All @@ -308,7 +308,8 @@ datapaths = [
'data/shaders',
'data/sounds',
'data/themes',
'data/xsl']
'data/xsl'
]

foreach dp: datapaths
install_subdir( dp, install_dir: 'share/games/performous')
Expand Down
5 changes: 5 additions & 0 deletions subprojects/ced.wrap
@@ -0,0 +1,5 @@
[wrap-file]
directory=compact_enc_det-meson
source_url=https://github.com/performous/compact_enc_det/archive/refs/heads/meson.zip
source_filename=meson.zip
source_hash=dcc2cb98b8aeb63370bea6d5f20b7aadc776f223083dccf701b71815321442e2

0 comments on commit a423a7d

Please sign in to comment.