Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pistache
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
pistache
Commits
df5bc509
Unverified
Commit
df5bc509
authored
Mar 16, 2021
by
Tachi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support Meson versions as old as 0.50.0
parent
8f7cd12a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
8 deletions
+24
-8
README.md
README.md
+6
-0
meson.build
meson.build
+11
-3
src/meson.build
src/meson.build
+6
-4
tests/meson.build
tests/meson.build
+1
-1
No files found.
README.md
View file @
df5bc509
...
...
@@ -149,6 +149,12 @@ executable(
)
```
If you're using a Meson version older than 0.55.0 you'll have to use the "older" syntax for
`depependecy()`
:
```
meson
dependencies: dependency('pistache', fallback ['pistache', 'pistache_static_dep'])
```
### Makefile
To use within a vanilla makefile, you can call
`pkg-config`
directly to supply compiler and linker flags using shell substitution.
...
...
meson.build
View file @
df5bc509
...
...
@@ -10,7 +10,7 @@ project(
'b_lto=false',
'warning_level=3'
],
meson_version: '>=0.5
7
.0'
meson_version: '>=0.5
0
.0'
)
compiler = meson.get_compiler('cpp')
...
...
@@ -72,8 +72,16 @@ if get_option('PISTACHE_USE_SSL')
pc_libs += ['-lssl', '-lcrypto']
endif
fs = import('fs')
version_data_raw = fs.read('version.txt').split('\n')
version_data_raw = ''
if meson.version().version_compare('>=0.57.0')
fs = import('fs')
version_data_raw = fs.read('version.txt').split('\n')
else
# Ugly workaround for reading a file
version_data_raw = run_command(
find_program('python3'), '-c', 'print(open("version.txt").read())'
).stdout().strip().split('\n')
endif
version_data_conf = configuration_data()
foreach _ : version_data_raw
if _ != ''
...
...
src/meson.build
View file @
df5bc509
...
...
@@ -50,8 +50,10 @@ libpistache_shared = shared_library(
pistache_static_dep = declare_dependency(link_with: libpistache_static, include_directories: incl_pistache)
pistache_shared_dep = declare_dependency(link_with: libpistache_shared, include_directories: incl_pistache)
if get_option('default_library') == 'static'
if meson.version().version_compare('>=0.54.0')
if get_option('default_library') == 'static'
meson.override_dependency('pistache', pistache_static_dep)
else
else
meson.override_dependency('pistache', pistache_shared_dep)
endif
endif
tests/meson.build
View file @
df5bc509
...
...
@@ -7,7 +7,7 @@ cppcheck = find_program('cppcheck', required: false)
if cppcheck.found()
cppcheck_args = ['--enable=all','-DCPPCHECK','--suppress=*:third-party*','--suppress=*:tests*','--suppress=noExplicitConstructor:include/pistache/optional.h']
else
warning('
c
an\'t find Cppcheck')
warning('
C
an\'t find Cppcheck')
endif
# TODO
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment