moved cli11 dependency to meson wrap package
Some checks failed
Build ptprnt / build (push) Failing after 29s
Some checks failed
Build ptprnt / build (push) Failing after 29s
This commit is contained in:
@@ -14,7 +14,7 @@ jobs:
|
|||||||
- name: install meson
|
- name: install meson
|
||||||
run: apt-get -yq install meson
|
run: apt-get -yq install meson
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: apt-get -yq install libusb-1.0-0-dev libspdlog-dev libpango1.0-dev libcairo2-dev gcovr libcli11-dev
|
run: apt-get -yq install libusb-1.0-0-dev libspdlog-dev libpango1.0-dev libcairo2-dev gcovr
|
||||||
- name: setup builddir
|
- name: setup builddir
|
||||||
run: meson setup builddir -Db_coverage=true
|
run: meson setup builddir -Db_coverage=true
|
||||||
- name: build all targets
|
- name: build all targets
|
||||||
|
@@ -14,12 +14,12 @@ This project requires:
|
|||||||
|
|
||||||
Install dependencies on Arch Linux
|
Install dependencies on Arch Linux
|
||||||
``` bash
|
``` bash
|
||||||
pacman -S libusb spdlog pango cairo meson gcovr cli11
|
pacman -S libusb spdlog pango cairo meson gcovr
|
||||||
```
|
```
|
||||||
|
|
||||||
Install dependencies on Debian/Ubuntu
|
Install dependencies on Debian/Ubuntu
|
||||||
``` bash
|
``` bash
|
||||||
apt-get install libusb-1.0-0-dev libspdlog-dev libpango1.0-dev libcairo2-dev meson gcovr libcli11-dev
|
apt-get install libusb-1.0-0-dev libspdlog-dev libpango1.0-dev libcairo2-dev meson gcovr
|
||||||
```
|
```
|
||||||
|
|
||||||
## Build
|
## Build
|
||||||
|
13
meson.build
13
meson.build
@@ -7,7 +7,6 @@ project('ptprnt', 'cpp',
|
|||||||
usb_dep = dependency('libusb-1.0')
|
usb_dep = dependency('libusb-1.0')
|
||||||
log_dep = dependency('spdlog')
|
log_dep = dependency('spdlog')
|
||||||
pangocairo_dep = dependency('pangocairo')
|
pangocairo_dep = dependency('pangocairo')
|
||||||
cli11_dep = dependency('CLI11')
|
|
||||||
|
|
||||||
incdir = include_directories('src')
|
incdir = include_directories('src')
|
||||||
|
|
||||||
@@ -45,17 +44,25 @@ ptprnt_lib = library('ptprnt',
|
|||||||
ptprnt_dep = declare_dependency(include_directories: incdir,
|
ptprnt_dep = declare_dependency(include_directories: incdir,
|
||||||
link_with: ptprnt_lib)
|
link_with: ptprnt_lib)
|
||||||
|
|
||||||
|
# CLI11
|
||||||
|
cli11_proj = subproject('cli11')
|
||||||
|
cli11_dep = cli11_proj.get_variable('CLI11_dep')
|
||||||
|
if not cli11_dep.found()
|
||||||
|
error('CLI11 not found, can not proceed')
|
||||||
|
endif
|
||||||
|
|
||||||
ptprnt_exe = executable(
|
ptprnt_exe = executable(
|
||||||
'ptprnt',
|
'ptprnt',
|
||||||
'src/main.cpp',
|
'src/main.cpp',
|
||||||
install: true,
|
install: true,
|
||||||
dependencies : [usb_dep, log_dep, ptprnt_dep, cli11_dep],
|
dependencies : [usb_dep, log_dep, ptprnt_dep, ],
|
||||||
cpp_args : ['-DPROJ_VERSION="'+meson.project_version()+'"'],
|
cpp_args : ['-DPROJ_VERSION="'+meson.project_version()+'"'],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
### Unit tests
|
||||||
|
|
||||||
#cmake = import('cmake')
|
# GTest
|
||||||
gtest_proj = subproject('gtest')
|
gtest_proj = subproject('gtest')
|
||||||
gtest_dep = gtest_proj.get_variable('gtest_main_dep')
|
gtest_dep = gtest_proj.get_variable('gtest_main_dep')
|
||||||
if not gtest_dep.found()
|
if not gtest_dep.found()
|
||||||
|
9
subprojects/cli11.wrap
Normal file
9
subprojects/cli11.wrap
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
[wrap-file]
|
||||||
|
directory = CLI11-2.3.2
|
||||||
|
source_url = https://github.com/CLIUtils/CLI11/archive/refs/tags/v2.3.2.tar.gz
|
||||||
|
source_filename = CLI11-2.3.2.tar.gz
|
||||||
|
source_hash = aac0ab42108131ac5d3344a9db0fdf25c4db652296641955720a4fbe52334e22
|
||||||
|
wrapdb_version = 2.3.2-1
|
||||||
|
|
||||||
|
[provide]
|
||||||
|
cli11 = CLI11_dep
|
Reference in New Issue
Block a user