Thiago, Ulf, I focus on the practical side of things because I can’t simply know everything.
With qmake I only had to do this: TEMPLATE = lib CONFIG += staticlib RESOURCES += $$PWD/resources/resources.qrc And all the resources listed in the .qrc file would be available in the final lib. This is what I’m trying to achieve with cmake. Best, Nuno > On 12 Jan 2023, at 14:18, Thiago Macieira <thiago.macie...@intel.com> wrote: > > On Thursday, 12 January 2023 00:36:01 PST Ulf Hermann via Interest wrote: >> That's because linkers "optimize" the resources out if you don't. > > Strictly speaking, this should read "linkers don't include stuff you don't > need". If you don't need a particular .o from the static library, it won't be > included in the output. > > "Need" is defined as "provides a symbol that is undefined in the linker at > this > point". > >> We can't do much about this. > > Yes, there is. There's -Wl,--whole-archive for the Unix linkers. This should > solve the problem for everyone except MSVC users. > > -- > Thiago Macieira - thiago.macieira (AT) intel.com > Cloud Software Architect - Intel DCAI Cloud Engineering > > > > _______________________________________________ > Interest mailing list > Interest@qt-project.org > https://lists.qt-project.org/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest