lsl_archived icon indicating copy to clipboard operation
lsl_archived copied to clipboard

integrating 3rd party library updates into CMake/CI

Open dmedine opened this issue 7 years ago • 3 comments

How? Programmatically, I mean.

I have some library updates from Brain Products and I'd like to get them into the build structure somehow. Are we still relying on the SCCN ftp to store the 3rd party dependencies?

dmedine avatar Aug 10 '18 13:08 dmedine

Since none of us have access to SCCN's ftp anymore, it is time to move away from that. Github releases looks like it will work to me: https://help.github.com/articles/distributing-large-binaries/ https://help.github.com/articles/about-releases/ If that isn't good enough, I'd go to Amazon file hosting next. If there is a cost, I could take care of it.

mgrivich avatar Aug 10 '18 13:08 mgrivich

If you're talking about storage, this is one of the great benefits of separating the repos. https://github.com/labstreaminglayer/App-BrainProducts/ Create a release, then you can attach binaries in the release. This is outlined in the link from Matthew.

If you're talking about how to get CMake to download them, that's also pretty easy to do. Use cmake ExternalProject_Add to create a target.

Then you have several ways to trigger that target.

  • You can trigger its download during configure (see here).
  • You can make your real target dependent on it using add_dependencies(${target} ${ext_name}) which will cause the external target to be executed (download, build if necessary) during the build phase of the ${target}.
    • You will have to tell developers to first attempt to build the executable to download the headers they need for proper development.
  • You can create a new target called something like "get-deps" that depends on the external target, then tell users to first call cmake --build . --target get-deps (or use the IDE equivalent of right-clicking on the get-deps target and building that).

cboulay avatar Aug 10 '18 14:08 cboulay

Thanks for the details. I think before I start implementing anything, we should establish a consensus on what constitutes best practices in this regard.

As for the split up super-repo, getting this finalized (and by that I mean, up-to-date and workable in a local checkout) is another nice project for the workshop.

On 08/10/2018 04:22 PM, Chadwick Boulay wrote:

If you're talking about storage, this is one of the great benefits of separating the repos. https://github.com/labstreaminglayer/App-BrainProducts/ Create a release, then you can attach binaries in the release. This is outlined in the link from Matthew.

If you're talking about how to get CMake to download them, that's also pretty easy to do. Use cmake |ExternalProject_Add| https://cmake.org/cmake/help/latest/module/ExternalProject.html to create a target.

Then you have several ways to trigger that target.

  • You can trigger its download during configure (see here https://stackoverflow.com/questions/37553280/how-to-build-cmake-externalproject-while-configurating-main-one.
  • You can make your real target dependent on it using |add_dependencies(${target} ${ext_name})| which will cause the external target to be executed (download, build if necessary) during the build phase of the ${target}. o You will have to tell developers to first attempt to build the executable to download the headers they need for proper development.
  • You can create a new target called something like "get-deps" that depends on the external target, then tell users to first call |cmake --build . --target get-deps| (or use the IDE equivalent of right-clicking on the |get-deps| target and building that).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sccn/labstreaminglayer/issues/332#issuecomment-412097461, or mute the thread https://github.com/notifications/unsubscribe-auth/ADch7nqRiMoURodXY98mA6SiANDVe02Tks5uPZckgaJpZM4V4MJO.

dmedine avatar Aug 11 '18 07:08 dmedine