Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] One package with more than one CMakeLists.txt (dlib)
Date: Sun, 8 Jul 2018 16:07:27 +0200	[thread overview]
Message-ID: <20180708140727.GC7163@scaer> (raw)
In-Reply-To: <20180708154350.225b3f7f4c1c0bcdc0a52195@windows3.de>

Dennis, All,

On 2018-07-08 15:43 +0200, Dennis Schulmeister-Zimolong spake thusly:
> I'm currently trying to create a buildroot package for libdlib.
> (http://dlib.net/). As dlib uses CMake the package definition itself is
> straight-forward. However the source tree also contains a few utility
> applications as well as python bindings which each come with their own
> CMakeLists.txt.

What's even worse (I think), is that each individual tool includes the
dlib directory in their CMakeLists.txt, thus triggering a private,
static build of the library and using that static version... :-(

> What's the best way to deal with this?

The best would be to change upstream's code to use a single
CMakeList.txt, which would optionally build and install the tools...

> Right now my Config.in looks
> like this:
> 
> config BR2_PACKAGE_LIBDLIB
> 	bool "libdlib"
> 	...
> 
> if BR2_PACKAGE_LIBDLIB
> 
> config BR2_PACKAGE_LIBDLIB_TOOLS_ARCHIVED
> 	bool "archived tools"
> 	help
> 	  Archived tools from the tools/archive directory inside
> 	  the dlib source tree
> 
> config BR2_PACKAGE_LIBDLIB_TOOLS_HTMLIFY
> 	bool "htmlify"
> 	help
> 	  Utility program htmlify from the tools/htmlify directory
> 	  inside the dlib source tree
> 
> ...
> endif
> 
> Is this even feasible? How can I execute CMake more than once with the
> cmake-package infrastructure without reinventing the wheel. Or is it
> better to define separate packages for each tool although they all live
> in the same source tree?

Well, do you actually need to the tools, or do you just need the lib?
If you don't need the tools, then don't even bother...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

      reply	other threads:[~2018-07-08 14:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-08 13:43 [Buildroot] One package with more than one CMakeLists.txt (dlib) Dennis Schulmeister-Zimolong
2018-07-08 14:07 ` Yann E. MORIN [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180708140727.GC7163@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox