Re: cmake composer?

Kevin Funk <[email protected]> Fri, 04 Oct 2019 11:01:09 +0200
Newsgroups gmane.comp.kde.users.kdevelop
Message-ID <1926683.qBC5tXgrau@kerberos>
On Friday, 4 October 2019 10:02:04 CEST René J.V. Bertin wrote:
> Hi,
> 
> Quick question, KDevelop doesn't have any helpful functions to assist with
> the tediousness of hand-writing CMake files, does it?

It does:

There's basic completion helpers provided by KTextEditor (basically allowing 
you to autocomplete CMake commands)

There's advanced completion helpers provided by KDevelop which "understands" 
CMake to some extend, cf. attached screenshot

> Does KDE have any tools that can at least create a minimal skeleton CMake
> file?

Personally I usually start by copying a CMakeLists.txt file from a project 
having the same goal (e.g. standalone Qt app, standalone KDE app, Qt library, 
Qt plugin, ....).

If that does not help, KDevelop also has some CMake-based application 
templates which come with a pre-filled CMakeLists.txt, see e.g.: 
  https://www.youtube.com/watch?v=47xdLegd3z4

If you're looking for a basic Qt-only CMake template, go for Qt's CMake 
manual:
  https://doc.qt.io/archives/qt-5.11//cmake-manual.html

Then there's also a more generic but useful collection of CMake examples:
  https://github.com/onqtam/awesome-cmake#examples--templates

There's no "one-fits-all" CMakeLists.txt obviously.

Regards,
Kevin



> Thanks,
> R.


-- 
Kevin Funk | [email protected] | http://kfunk.org
kdevelop-cmake-completion.png (image/png, 27.7 KB) - not displayed
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQQ2TvpfY5VykH05KZnGTPVrE8rOXQUCXZcKVQAKCRDGTPVrE8rO
XazZAJ90O2vZtBQXTUrPvqvOPqQ9F9+LIQCgyG7QUe29wQ+vncV+rkCArAXaHlw=
=lSXh
-----END PGP SIGNATURE-----