tiled icon indicating copy to clipboard operation
tiled copied to clipboard

CMake support

Open AMDmi3 opened this issue 2 years ago • 10 comments

As per comment in f3079bba6c5f886df5ae23a4dc5506e670dd2157

It is possible this might be replaced with cmake files in the future,

and given the fact that qbs no longer works on FreeBSD (and likely other systems/distros which use clang13) and upstream doesn't seem to be working on a fix, it looks like it's time to start working on a CMake support.

I've made an MVP which compiles runnable tiled binary but lacks a lot of essential things like resources, plugins, installation and Qt6 support yet.

Does it make sense to continue work on it, e.g. is there a chance to get it accepted upstream? What are prerequisites for merging it? Feedback welcome.

Related discussions: #2031, #3039, #1484.

AMDmi3 avatar Jun 28 '22 13:06 AMDmi3

I don't personally want to maintain cmake project files, and I'd rather see Qbs support on FreeBSD being restored. The last comment on the Qt issue ("We might be able to switch the JS engine; stay tuned.") sounds somewhat promising.

The quickest short-term solution to getting Tiled packaged on FreeBSD may be to revert the change that removed the qmake project files (f3079bba6c5f886df5ae23a4dc5506e670dd2157). It should only need the addition and removal of some source files (edit: no, I'd like to take that back after realizing I did 65999373682947eda01c141fabe499d3b707df34 afterwards).

That said, feel free to open a PR for the change adding a cmake project. I will have a close look at it in August when I'm back from holiday. There's still a chance that I could learn to see its benefits.

bjorn avatar Jul 03 '22 19:07 bjorn

There is no longer a good way to update the Tiled package in Gentoo; the available eclasses do not support qbs. The latest version will probably be frozen at 1.8.6 until someone implements qbs support, or a more widely-used build system is implemented.

Zer0-One avatar Jul 31 '22 22:07 Zer0-One

@Zer0-One Hmm, I don't know about eclasses, but at least there is an old version of Qbs in Gentoo packages (https://packages.gentoo.org/packages/dev-util/qbs), which should be new enough to compile Tiled.

bjorn avatar Aug 01 '22 06:08 bjorn

Wanted to give a quick :+1: to restoring the qmake files as their removal has made the GNU Guix package for Tiled no longer build for versions 1.9.0+ and switching to the deprecated qbs tool is not desirable.

davexunit avatar Sep 01 '22 13:09 davexunit

@davexunit I'm sorry but there's no plan to restore the qmake projects. Btw, Qbs was only "announced deprecated" by the Qt Company, but is otherwise still being maintained as evident by regular releases and the commit history. I would recommend looking into using it on GNU Guix as well.

Going forward, the only real alternative to Qbs is CMake.

bjorn avatar Sep 01 '22 18:09 bjorn

@bjorn Oh sorry, I misinterpreted an earlier comment to mean there was a possibility of putting the qmake files back. An option to use CMake would be great, too. I've never even heard of Qbs before and there isn't a single Qt-dependent application in Guix that uses it, so as a non-Qt-developer outsider it seems like a pretty obscure build system to make mandatory.

davexunit avatar Sep 01 '22 19:09 davexunit

I've never even heard of Qbs before and there isn't a single Qt-dependent application in Guix that uses it, so as a non-Qt-developer outsider it seems like a pretty obscure build system to make mandatory.

I prefer to call it a hidden gem. :-)

bjorn avatar Sep 01 '22 19:09 bjorn

Have you checked out my WIP on CMake support? What's the minimal requirements to get it accepted?

For the record, I don't expect qbs to be fixed on FreeBSD, and I would instead expect it to bring problems on other platforms over time. Though a few enthusiasts still commit to it, that's not enough to keep a cross platform build system afloat, and their ranks dwindle with each release. Otherwise there's no community support for it, it's not used by any other projects, there's no support for it in the packaging frameworks (such as mentioned eclasses).

AMDmi3 avatar Sep 01 '22 19:09 AMDmi3

@bjorn :) thanks for clarifying that qbs is still being actively maintained.

davexunit avatar Sep 01 '22 19:09 davexunit

Have you checked out my WIP on CMake support? What's the minimal requirements to get it accepted?

I've had a short look at it, but I asked you to make a PR which makes it easier to discuss and eventually accept this. I think I'd put the minimal requirements pretty low, for example that it can be used to build the Tiled package for at least one system (for example FreeBSD).

bjorn avatar Sep 04 '22 19:09 bjorn

and given the fact that qbs no longer works on FreeBSD (and likely other systems/distros which use clang13) and upstream doesn't seem to be working on a fix, it looks like it's time to start working on a CMake support.

In the meantime, Qbs 2.0 was released, which addresses this issue. I think it's time to update the Qbs package in FreeBSD (and Gentoo and Guix, I guess). :-)

I'll close this issue since I don't personally plan to maintain another set of project files, but that doesn't mean I would reject any related pull requests from people who'd be willing to do this.

bjorn avatar May 11 '23 08:05 bjorn