QtAwesome icon indicating copy to clipboard operation
QtAwesome copied to clipboard

add cmake support

Open Drapegnik opened this issue 8 years ago • 6 comments

add CMakeLists.txt rules for projects with cmake build

Drapegnik avatar Feb 22 '17 22:02 Drapegnik

I'm seriously considering to merge this. I don't know cmake, so I haven't test it. But I've seen several forks trying to implement this, so it looks like people want this.

gamecreature avatar Feb 23 '17 07:02 gamecreature

I use it in my project https://github.com/lybros/sfm and it's work. Also I provide sample, so you can test it.

Drapegnik avatar Feb 23 '17 08:02 Drapegnik

You probably want to add the QtAwesomeConfig.cmake and all the mechanism for third party building upon qtawesome to be able to find it.

SylvainCorlay avatar Feb 23 '17 08:02 SylvainCorlay

@Drapegnik There's one issue why I still haven't merged the code. You've changed the QtAwesomeSample/main.cpp file and changed the include to "../QtAwesome/QtAwesome.h". The example should also be buildable from another location.

@SylvainCorlay What do you mean with this remark?

gamecreature avatar Feb 23 '17 08:02 gamecreature

@gamecreature CMakeLists.txt generally specify where files must be installed when doing a cmake install in a certain installation prefix. Besides, it also produces .cmake files which are placed in cmake' s configuration directory so that other packages that depend on it can locate headers and binaries (with find_package).

For example, you can check out the CMakeLists.txt of the xtensor project https://github.com/QuantStack/xtensor/blob/master/CMakeLists.txt#L68

SylvainCorlay avatar Feb 23 '17 08:02 SylvainCorlay

@Drapegnik Would you care to update this?

iKlsR avatar Apr 22 '18 00:04 iKlsR

This issue was still open, by I just merged another PR for cmake. (This one didn't make it because of the change in the c++ include as mentioned earlier). Hopefully the current cmake configuration works for you. Still thanks for contributing

gamecreature avatar Feb 02 '23 10:02 gamecreature