All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] One package with more than one CMakeLists.txt (dlib)
@ 2018-07-08 13:43 Dennis Schulmeister-Zimolong
  2018-07-08 14:07 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Dennis Schulmeister-Zimolong @ 2018-07-08 13:43 UTC (permalink / raw)
  To: buildroot

Hi,

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 the best way to deal with this? 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?

Kind regards, Dennis

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Buildroot] One package with more than one CMakeLists.txt (dlib)
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2018-07-08 14:07 UTC (permalink / raw)
  To: buildroot

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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-08 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.