Build opencv with cmake and bazel

1,649 views
Skip to first unread message

Jaonary Rabarisoa

unread,
Jun 9, 2016, 4:03:18 PM6/9/16
to bazel-discuss
Hi all,

I'd like to build opencv with bazel and use it as a dependency of another projet built with bazel. Instead of creating from scratch the opencv.BUILD file, 
I want to use cmake since it's straightforward to build opencv with cmake. Is it possible to create a custom build rule with bazel that calls
cmake and make from behind ?

Best,

Jaonary

Damien Martin-guillerez

unread,
Jun 10, 2016, 3:54:08 AM6/10/16
to Jaonary Rabarisoa, bazel-discuss
Theoritically you could use a genrule to call cmake. You might have to craft the environment for CMake to work well.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/735da6ac-1fec-404a-b868-6659f7516d21%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Humesky

unread,
Jun 10, 2016, 1:05:48 PM6/10/16
to Damien Martin-guillerez, Jaonary Rabarisoa, bazel-discuss

Brian Edmonds

unread,
Jun 29, 2016, 6:04:43 PM6/29/16
to bazel-discuss, dmar...@google.com, jao...@gmail.com
On Friday, June 10, 2016 at 10:05:48 AM UTC-7, Alex Humesky wrote:

I've been playing around with this, and have yet to have satisfactory luck building opencv as an external dependency. Is there a bazel wiki, or some other repository of community wisdom on best practices for integrating external packages, and other bazel tips and tricks? Seems like it would be great to be able to reference such a thing when pulling in a new package, and leverage the blood, sweat and tears of prior attempts. Has no one actually done this successfully yet? The stackoverflow article is just suggested approaches, not a report of one or more ways that are being used in practice.

Brian. 
Reply all
Reply to author
Forward
0 new messages