[Buildroot] One package with more than one CMakeLists.txt (dlib)

Dennis Schulmeister-Zimolong buildroot at windows3.de
Sun Jul 8 13:43:50 UTC 2018


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


More information about the buildroot mailing list