A mulle-sde project that is not a library can't forward its dependencies

· nat's blog


Sometimes its tricky to get all the dependencies right for a project. And then once you got it to distribute to another say a "demo" project.

Point in case mulle-freetype. I want to link freetype with harfbuzz. But only on windows do I actually want to build harfbuzz, because its very slow in building.

First solution #

Project Side #

1mulle-sde init -d mulle-freetype -m mulle-sde/c-developer none
2mulle-sourcetree -N add --nodetype 'local' --marks 'no-delete,no-header,no-link,no-share,no-subproject,no-update' 'craftinfo/freetype-craftinfo'
3mulle-sourcetree -N add --nodetype '${HARFBUZZ_NODETYPE:-tar}' --marks 'no-all-load,no-cmake-loader,no-cmake-platform-linux,no-cmake-searchpath,no-craft-platform-linux,no-header,no-import' --url '${HARFBUZZ_URL:-https://github.com/harfbuzz/harfbuzz/archive/${MULLE_TAG}.tar.gz}' --branch '${HARFBUZZ_BRANCH}' --tag '${HARFBUZZ_TAG:-12.2.0}' 'harfbuzz'
4mulle-sourcetree -N add --nodetype '${FREETYPE_NODETYPE:-tar}' --marks 'no-all-load,no-cmake-inherit,no-header,no-import,no-inplace,no-require,only-liftheaders' --userinfo 'aliases=Debug:freetyped,Release:freetype' --url '${FREETYPE_URL:-https://github.com/MulleUI/freetype/archive/VER-${MULLE_TAG}.tar.gz}' --branch '${FREETYPE_BRANCH}' --tag '${FREETYPE_TAR:-2-14-1.1}' 'freetype'
5mulle-sourcetree -N add --nodetype 'none' --marks 'no-all-load,no-build,no-cmake-inherit,no-delete,no-dependency,no-fs,no-header,no-import,no-share,no-update,only-platform-linux' 'harfbuzz'

Ok. It's already a bit tricky, because we have two nodes with name harfbuzz. One is a dependency and the other a library. We use on a per-platform basis either one or the other.

We use numeric indices to address the nodes now, when we want to change something like mulle-sourcetree mark 3 no-all-load.

User Side #

On the user side the problem is, that we have a dependency but its not creating a library. This means everything builds fine (as long as we mark it with no-craft (not no-build)), but we do not get the proper cmake files that will enable the user executable to automatically link freetype and harf buzz.

FAILURE

Proper solution #

There is no way around making mulle-freetype a library. Its basically empty, oh well.

last updated: