-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add meson build system for C++ #41
base: main
Are you sure you want to change the base?
Conversation
'UnitVector3d.cc', | ||
'utils.cc', | ||
'Vector3d.cc'] | ||
sphgeom = static_library( |
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.
Why a static library, particularly? If you just use library()
it becomes the choice of the builder (via -Ddefault_library=static
, but it also accepts =both
to build both at the same time).
The cmake build uses shared, not static, though cmake doesn't really have a good way to choose between the two.
|
||
subdir('src') | ||
|
||
pkg_mod = import('pkgconfig') |
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.
incdir = include_directories('../include/') | ||
|
||
install_headers( | ||
'../include/lsst/sphgeom/Angle.h', | ||
'../include/lsst/sphgeom/AngleInterval.h', |
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.
Personally, I would define this in subdir('include')
so you don't need all these ../ everywhere. :)
2c4f45a
to
8a2e1e1
Compare
Just bumping to say that I've been in the process of moving states, but I'll hopefully finish this PR soon once things settle down. |
a19f8bb
to
b552bcd
Compare
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.
I rebased this PR just in case there is still interest in it. |
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.