Cmake compilation trouble

From GCompris
Revision as of 15:10, 7 January 2021 by Allon (talk | contribs)
Jump to: navigation, search

Introduction: This is a tutorial for installation of Qt 5.12.5 to Ubuntu 18.04, It took me time to figure out that I have used distribution Qt + Qt Creator that didn’t work with CMake, The problem was that I have installed Qt 5.12.10 and when running CMake in gcompris project, this error appears to me:

[[1]]

So it is better to use Qt 5.12.5 as it is the last tested version that is in sync with GCompris android compilation documentation.


file:///tmp/mozilla_charruau0/Installation Guide/Pictures/1000020100000400000000DA498CD38B4FF55A53.png


Installation Guide:

   • Download

Download Qt 5.12.5 from here, select qt-opensource-linux-x64-5.12.5.run, the installation file will be downloaded, it will take a while. After download finishes, you will see the installation file in Downloads directory.

   • Install

Using command line:

   1. Go to the directory where the installation file has been downloaded:
cd Downloads
   2.  Adjust permission rights:

chmod +x qt-opensource-linux-x64-5.12.5.run

   3. Run the installer and follow the instruction to complete the installation: 
./qt-opensource-linux-x64-5.12.5.run
           After running the last command, Qt 5.12.5 Setup window will appear:
            
         



         Click next then log in with your qt account, if you don’t have a qt account you can register from here:
          
        After login to your Qt Account, click next, then you will specify the directory where Qt 5.12.5 will be installed, it is prefer to install it in /home/xxxxx/Qt5.12.5/, so you can make a new directory in home for example QtNewVersion (mkdir QtNewVersion) 


After making a new directory QtNewVersion, you can specify this directory where Qt 5.12.5 will be installed by clicking Browse then click next. Then you need to select components which you want to install. (Install all of them)

Then click next and accept the licenses to complete installing, it will take a while until installation is finished.







Qt Creator will be launched.











After launching Qt Creator, click File then Open File or Project and go to gcompris directory and open CMakeLists.txt In the left pan of Qt Creator, right click on the project and click CMake.



After running CMake, if everything goes right, the output will be like this:

Then Finally you can run it by clicking the first green arrow: ( it takes a minute until GCompris appears don’t worry)