Skip to content

Commit

Permalink
move c_api to src; one single lib
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoMVale committed Jan 22, 2025
1 parent ee51dca commit 0fd91ba
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
14 changes: 0 additions & 14 deletions c/meson.build
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
odrpack_c_lib = library(
meson.project_name() + '_c',
sources: 'odrpack_capi.f90',
link_with: odrpack_lib,
install: true,
)

incdir = include_directories('include')

odrpack_c_dep = declare_dependency(
include_directories: [incdir],
link_with: [odrpack_c_lib]
)

if get_option('build_examples')
subdir('example')
endif
Expand Down
17 changes: 12 additions & 5 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ project(
meson_version: '>=1.1',
license: 'MIT',
default_options: [
'default_library=static',
'buildtype=release',
'fortran_std=none'
],
Expand Down Expand Up @@ -41,22 +40,30 @@ odrpack_source = files(
'src/odrpack_kinds.F90',
'src/odrpack_core.f90',
'src/odrpack_reports.f90',
'src/odrpack_capi.f90'
)

odrpack_lib = library(
odrpack_lib = static_library(
meson.project_name(),
sources: [odrpack_source, blas_source],
dependencies: [blas_dep],
install: true
# install: true
)

# C interface
subdir('c')
incdir = include_directories('c/include')

odrpack_dep = declare_dependency(
include_directories: [incdir],
link_with: [odrpack_lib]
)

# Examples
if get_option('build_examples')
subdir('example')
endif

# C examples
subdir('c')

# Tests
subdir('test')
File renamed without changes.

0 comments on commit 0fd91ba

Please sign in to comment.