rschroll / beru

The Basic Epub Reader for Ubuntu
http://rschroll.github.io/beru/
GNU General Public License v3.0
24 stars 12 forks source link

Port to cmake #53

Closed rschroll closed 10 years ago

rschroll commented 10 years ago

When I started Beru, I used the default build system qmake. Since then, they've changed the default to cmake. Many of the tools built in to Qt Creator (notably cross-compiling) assume a cmake system. Additionally, the instructions for translation (#51) just say, "use cmake". We should bite the bullet make the switch.

randy-jr-olive commented 10 years ago

I've managed to take care of most of this stuff, but I'm having a hard time getting the CMakeLists.txt to import the libraries need in the ui/main.qml file. I get the error module not found for all the import statements. Other than that (so far) everything builds and compiles properly, but I can't fully test until I can get the QML file to load. I've been looking into find_package, include, and get_target_property, but no luck so far.

rschroll commented 10 years ago

I've managed to take care of most of this stuff, but I'm having a hard time getting the CMakeLists.txt to import the libraries need in the ui/main.qml file. I get the error module not found for all the import statements.

From the little I know of cmake, it likes to do the building in a separate directory. It may be best to copy the ui folder into that separate directory and run beru from there.

In any event, feel free to open a pull request with your work in progress, and I can take a look.

randy-jr-olive commented 10 years ago

It's all working now, I'm just playing around with it to optimize. The problem was that the plugins have different names throughout the CMakeLists files, so I was trying to include the wrong names in certain places. I'll clean it up and push to you soon, then you can let me know what you think.

rschroll commented 10 years ago

I've just pushed some commits that (ab)use qmake to do compilation-time generation of a QML file. Don't worry about trying to replicate it with cmake. I'll fix that up after everything else is in place.