qqc2-desktop-style as framework

Harald Sitter sitter at kde.org
Tue Sep 12 22:16:10 UTC 2017


Mh

> set(CMAKE_LIBRARY_OUTPUT_DIRECTORY

I don't think that will do for production. "This property specifies
the directory into which library target files should be built.
Multi-configuration generators (VS, Xcode) append a per-configuration
subdirectory to the specified directory."

I *think* the easiest way to get this behavior is to still also adjust
the source tree. Namely, if you have the add_library in
src/org/kde/kirigami.2/CMakeLists.txt that will end up in
$build/org/kde/kirigami.2/foo.so no matter what. I am too tired to
check that though, so I may be talking nonesense here.

Albert raises a good point, which I think would be fixed by not using
a glob but listing all files explicitly (which should make `make`
automatically rerun cmake on account of changed files).

Alternatively to solve both problems the "install into builddir" logic
could be outsourced into a standalone cmake helper which you manually
call through a custom target. That way the target can always bedirty
(run for every make thus keeping the builddir up to date) AND you can
use install() to get the .so to where you want it to be without having
to meddle with the source tree at all.

HS


More information about the Kde-frameworks-devel mailing list