Conversation
Qmake somehow correctly added the moc files to the source files. Cmake needs a little help by adding the #include "moc_*.cpp" declaration. If not all are added to a single file which creates issues with the DECLARE_TEST define.
Run cmake on travis
|
I should mention that I was unable to test the windows development environment because I don't have one of those. macOS should work according to travis. |
|
Thanks for your work! I'm going to investigate it further. If the .cpp files weren't changed, I've would have merged it directly. I don't like the requirement for manually including the moc_*.c files. Btw. I had recently had an issue with including '.c' files in (k-takata/Onigmo#88 ) |
|
I didn't like it either, but I didn't find another way (without changing the Here is what the
The It might be possible to create a custom build step that runs |
|
I found another way to create and set the Have a look at https://github.com/Mudlet/Mudlet/blob/development/3rdparty/communi/CMakeLists.txt#L80 and the block below, maybe that's more to your preference? |
|
http://doc.qt.io/qt-5/cmake-manual.html I havent investigated this, but is this an option? |
|
That's already set, otherwise I'd have to manually tell cmake which files to run moc on. |
|
I've took your pull-request and changed it to use a different DECLARE_TEST macro. |
|
I'll have another look at our setup later, to see if it works. But you forgot to include a commit I added a bit later (more or less silently) to be able to compile dependent targets. |
|
Oops, just added the commit |
d03ba75 to
d523932
Compare
|
The new branch works for us as well, so I'm fine with going ahead and merging |
|
Merged via branch/pr10 |
Update to latest upstream for ctrl support on macos
This adds the use of the cmake build system parallel to the qmake system already in place.
In order to make sure cmake can compile the files that included the
Q_OBJECTmacro, I had to explicitly include the createdmoc_files into the correct one. Without those includes, theDECLARE_TESTmacro didn't work correctly.