Skip to content

Commit

Permalink
BLD: Try to use more subprojects
Browse files Browse the repository at this point in the history
  • Loading branch information
RuhiRG committed Aug 26, 2024
1 parent d3e4606 commit 962c31f
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
34 changes: 18 additions & 16 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

# The project is seams-core, the executable is yodaStruct
project('seams-core', 'cpp',
version : '1.5.1',
version : '1.0.1',
default_options : ['warning_level=3', 'cpp_std=c++14'])

host_system = host_machine.system()
Expand Down Expand Up @@ -45,34 +45,36 @@ _deps += m_dep
_deps += [declare_dependency(link_args: '-lstdc++')]

# All of which can be installed with meson wrap install <blah> originally
eigen_dep = dependency('eigen3',
version: '3.4.0',
static: true,
required: true)
eigen_dep = subproject('eigen').get_variable('eigen_dep')
_deps += [ eigen_dep ]

fmt_dep = dependency('fmt',
version: '9.1.0',
static: true,
required: true)
fmt_dep = subproject('fmt').get_variable('fmt_dep')
_deps += [ fmt_dep ]

cmake = import('cmake')
optv_cppyaml = cmake.subproject_options()
optv_cppyaml.add_cmake_defines(
{
'CMAKE_BUILD_TYPE': 'Release',
'YAML_BUILD_SHARED_LIBS': 'OFF',
'CMAKE_POSITION_INDEPENDENT_CODE': true,
'CMAKE_CXX_FLAGS': '-w',
'CMAKE_C_FLAGS': '-w',
},
)
cmcppyaml = cmake.subproject('yaml-cpp', options: optv_cppyaml)
_deps += cmcppyaml.dependency('yaml-cpp')


boost_dep = dependency('boost',
modules : [
'filesystem',
'system',
],
static: true,
required : false,
)
_deps += [ boost_dep ]

libyamlcpp_dep = dependency('yaml-cpp',
static: true,
fallback: ['yaml-cpp',
'libyamlcpp_dep'])
_deps += [ libyamlcpp_dep ]

# Include Sources

_incdirs += include_directories([ 'src/include/internal',
Expand Down
9 changes: 9 additions & 0 deletions yaml-cpp.wrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[wrap-git]
directory=yaml-cpp
url=https://github.com/jbeder/yaml-cpp.git
revision=84459a7f982ea4d10e943237b2e9c71afdab6a45
depth=1
method=cmake

[provide]
yaml-cpp=yaml-cpp

0 comments on commit 962c31f

Please sign in to comment.