gamecreature / QtAwesome

QtAwesome - Font Awesome for Qt Applications
Other
787 stars 149 forks source link

add cmake support #22

Closed Drapegnik closed 1 year ago

Drapegnik commented 7 years ago

add CMakeLists.txt rules for projects with cmake build

gamecreature commented 7 years ago

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.

Drapegnik commented 7 years ago

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

SylvainCorlay commented 7 years ago

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

gamecreature commented 7 years ago

@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?

SylvainCorlay commented 7 years ago

@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

iKlsR commented 6 years ago

@Drapegnik Would you care to update this?

gamecreature commented 1 year ago

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