jose icon indicating copy to clipboard operation
jose copied to clipboard

Modified the meson build declaration to

Open clauderobi opened this issue 2 years ago • 5 comments

  • support to optionally create a static library
  • allow the binary to use the non system library (libjose.so) when buildng a debug version

clauderobi avatar Feb 16 '24 20:02 clauderobi

I am not 100% sure I did this correctly. Anyway ninja test ran successfully.

Also, the behavior of meson setup .. --prefix=/usr/local is slightly different since it appears that the default build type is debugoptimized (to my surprise) and I changed the behaviour for that type. If needed I suggest to change the default build type to release.

clauderobi avatar Feb 16 '24 20:02 clauderobi

I may be mistaken, but I think this doesn't correctly build a static library if the shared library isn't being built. Trying to run it with:

  meson setup .. --prefix=/usr/local
  meson configure -Dbuild_static=true -Dbuild_dynamic=false
  ninja

causes a failure in cmd/meson.build with ../cmd/meson.build:29:16: ERROR: Unknown variable "libjose_dep". Ideally, I think if this is accepted, .github/actions/build.yml should probably be extended to build both a shared and static library (separately) to ensure that both get adequately tested on changes.

hdholm avatar Feb 17 '24 02:02 hdholm

Thanks for reporting.

My intent is to use the library as .... a library so I went too quick on actual executable generation. But before spending on fixing I have 2 questions:

  • IIUC the build as they are produces a debugoptimized variant, is it really the intent?
  • should there be an option to generate or not the executable. In such case the dynamic lib would be enabled implicitly

clauderobi avatar Feb 17 '24 17:02 clauderobi

Hopefully someone else will answer. I'm just a contributor. I don't make decisions. :smile:

hdholm avatar Feb 17 '24 18:02 hdholm

Ok, I added new commits to my master branch. According to the message above, I understand that the PR will include them. But I may be wrong... tell me.

I added an explicit option to build or not the executable. The default is true and will force build_dynamic to be true.

clauderobi avatar Mar 05 '24 20:03 clauderobi