Skip to content

Commit

Permalink
meson: Don't require pcg-cpp subproject
Browse files Browse the repository at this point in the history
  • Loading branch information
talisein committed Oct 27, 2024
1 parent 784057f commit 40aa8dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
11 changes: 8 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

project('ppgen', ['cpp'],
version: '1.2',
version: '1.3.0',
license: 'GPL3+',
default_options : ['cpp_std=c++14',
'buildtype=release'])
Expand All @@ -8,8 +9,12 @@ if not meson.get_compiler('cpp').has_header_symbol('experimental/iterator', '__c
error('C++ ostream_joiner not available. Use release 1.1')
endif

pcg_cpp_sp = subproject('pcg-cpp')
pcg_cpp_dep = pcg_cpp_sp.get_variable('pcg_cpp_dep')

if not meson.get_compiler('cpp').has_header('pcg_random.hpp')
pcg_cpp_dep = dependency('pcg-cpp', fallback: ['pcg-cpp'], method: 'cmake')
else
pcg_cpp_dep = dependency('', required: false)
endif

ppgen = executable('ppgen', 'src/ppgen.cpp',
dependencies: pcg_cpp_dep,
Expand Down
3 changes: 3 additions & 0 deletions subprojects/pcg-cpp.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ patch_url = https://wrapdb.mesonbuild.com/v1/projects/pcg/0.98.1/1/get_zip
patch_filename = pcg-0.98.1-1-wrap.zip
patch_hash = 99206a1e4e54b2f12b6177fa22d453dcdc612f67bc5d89760051c8bed509f783

[provide]
pcg-cpp = pcg_cpp_dep

0 comments on commit 40aa8dc

Please sign in to comment.