Skip to content

Commit

Permalink
Add meson build system for C++
Browse files Browse the repository at this point in the history
I'm writing a project using meson as the build system as sphgeom
happens to be a dependence. There were a few issues trying to build with
cmake and I found it easier to just add meson support.
  • Loading branch information
bonimy authored and timj committed Aug 16, 2024
1 parent 461a3dc commit 2a886ba
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
9 changes: 9 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
project('sphgeom', 'cpp')

subdir('src')

pkg_mod = import('pkgconfig')
pkg_mod.generate(
sphgeom,
description : 'C++ spherical geometry primitives for LSST Data Management'
)
69 changes: 69 additions & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
incdir = include_directories('../include/')

install_headers(
'../include/lsst/sphgeom/Angle.h',
'../include/lsst/sphgeom/AngleInterval.h',
'../include/lsst/sphgeom/BigInteger.h',
'../include/lsst/sphgeom/Box3d.h',
'../include/lsst/sphgeom/Box.h',
'../include/lsst/sphgeom/Chunker.h',
'../include/lsst/sphgeom/Circle.h',
'../include/lsst/sphgeom/codec.h',
'../include/lsst/sphgeom/CompoundRegion.h',
'../include/lsst/sphgeom/constants.h',
'../include/lsst/sphgeom/ConvexPolygon.h',
'../include/lsst/sphgeom/curve.h',
'../include/lsst/sphgeom/Ellipse.h',
'../include/lsst/sphgeom/HtmPixelization.h',
'../include/lsst/sphgeom/Interval1d.h',
'../include/lsst/sphgeom/Interval.h',
'../include/lsst/sphgeom/LonLat.h',
'../include/lsst/sphgeom/Matrix3d.h',
'../include/lsst/sphgeom/Mq3cPixelization.h',
'../include/lsst/sphgeom/NormalizedAngle.h',
'../include/lsst/sphgeom/NormalizedAngleInterval.h',
'../include/lsst/sphgeom/orientation.h',
'../include/lsst/sphgeom/Pixelization.h',
'../include/lsst/sphgeom/python.h',
'../include/lsst/sphgeom/Q3cPixelization.h',
'../include/lsst/sphgeom/RangeSet.h',
'../include/lsst/sphgeom/Region.h',
'../include/lsst/sphgeom/Relationship.h',
'../include/lsst/sphgeom/UnitVector3d.h',
'../include/lsst/sphgeom/utils.h',
'../include/lsst/sphgeom/Vector3d.h',
subdir : 'lsst/sphgeom'
)
sphgeom_sources = [
'Angle.cc',
'AngleInterval.cc',
'BigInteger.cc',
'Box3d.cc',
'Box.cc',
'Chunker.cc',
'Circle.cc',
'CompoundRegion.cc',
'ConvexPolygon.cc',
'Ellipse.cc',
'HtmPixelization.cc',
'Interval1d.cc',
'LonLat.cc',
'Matrix3d.cc',
'Mq3cPixelization.cc',
'NormalizedAngle.cc',
'NormalizedAngleInterval.cc',
'orientation.cc',
'Q3cPixelization.cc',
'RangeSet.cc',
'Region.cc',
'UnitVector3d.cc',
'utils.cc',
'Vector3d.cc']
sphgeom = static_library(
'sphgeom',
sphgeom_sources,
include_directories : incdir,
install: true)
dep_sphgeom = declare_dependency(
include_directories : incdir,
link_with : sphgeom)

0 comments on commit 2a886ba

Please sign in to comment.