-
Notifications
You must be signed in to change notification settings - Fork 14
Add meson build system for C++ #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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' | ||
) |
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', | ||
Comment on lines
+1
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Personally, I would define this in |
||
'../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( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why a static library, particularly? If you just use The cmake build uses shared, not static, though cmake doesn't really have a good way to choose between the two. |
||
'sphgeom', | ||
sphgeom_sources, | ||
include_directories : incdir, | ||
install: true) | ||
dep_sphgeom = declare_dependency( | ||
include_directories : incdir, | ||
link_with : sphgeom) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to creating a pkg-config file, you may also want to create a
declare_dependency()
that adds the incdir and the sphgeom library, as an interface, which then allows using this meson.build as a Meson subproject with automatic dependency fallback.