Skip to content

Commit

Permalink
Refactor meson files.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregersn committed Apr 5, 2024
1 parent 3f27396 commit 001f521
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ eigen_dep = dependency('eigen3')

eigen_dep = subproject('eigen').get_variable('eigen_dep')

inc_dir = include_directories('include')
inc = include_directories('include')

subdir('include')
subdir('src')
subdir('tests')
subdir('screenshot-tests')

libpyro_dep = declare_dependency(include_directories: inc_dir, link_with: pyrolib)
pyro_dep = declare_dependency(include_directories: inc, link_with: pyro)

pkg_mod = import('pkgconfig')
pkg_mod.generate(libraries: pyrolib,
pkg_mod.generate(libraries: pyro,
version: '0.0.1-alpha',
name: 'libpyro',
filebase: 'libpyro',
name: 'pyro',
filebase: 'pyro',
description: 'A library to generate graphics'
)
4 changes: 2 additions & 2 deletions screenshot-tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ test_sources = [
catch2 = subproject('catch2', default_options: 'tests=false')

testexe = executable('screenshot-tests', test_sources,
include_directories: inc_dir,
link_with: pyrolib,
include_directories: inc,
link_with: pyro,
dependencies: [catch2.get_variable('catch2_dep'), eigen_dep],
install: false)

Expand Down
6 changes: 3 additions & 3 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ pyro_sources = ['pyro.cpp',
'transformer.cpp',
'opensimplexnoise.cpp']

pyrolib = library('pyro',
pyro = library('pyro',
pyro_sources,
include_directories: inc_dir,
include_directories: inc,
dependencies: [libpng_dep, cairo_dep, libjpeg_dep, freetype_dep, sdl_dep, eigen_dep],
cpp_args: cpp_args,
install: false)
install: true)
4 changes: 2 additions & 2 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ test_sources = [
catch2 = subproject('catch2', default_options: 'tests=false')

testexe = executable('unit-tests', test_sources,
include_directories: inc_dir,
link_with: pyrolib,
include_directories: inc,
link_with: pyro,
dependencies: [catch2.get_variable('catch2_with_main_dep'), eigen_dep],
install: false)

Expand Down

0 comments on commit 001f521

Please sign in to comment.