Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Use Qt with Cmake
Forum Updated to NodeBB v4.3 + New Features

Use Qt with Cmake

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AnatoliyL
    wrote on 24 Sept 2013, 09:36 last edited by
    #1

    Good day . For a long time trying to solve the problem ( the third day ), which I will describe below.

    There is a project on xubuntu, which gathers with Cmake. Mandatory requirement to use the library from the repository , ie, you can not download from http://qt-project.org/. Libs i need: libQt5Core.so.5 libQt5Quick.so.5 libQt5Qml.so.5 libQt5Gui.so.5 libQt5Network.so.5  libQt5v8.so.5
    I have created a module library search cmake, it looks like this:
    @   FIND_LIBRARY (
                 QT5Libs
                 NAMES libQt5Core.so.5
         libQt5Quick.so.5
       libQt5Qml.so.5
       libQt5Gui.so.5
       libQt5Network.so.5
       libQt5v8.so.5
                 PATHS / usr / local / lib / usr / lib / opt / local / include / usr/lib/i386-linux-gnu /
                )
                   
    if (NOT QT5Libs)
        message (STATUS "Necessary QT5 libraries are not found")
        message (STATUS "To install it type in the command line:")
        message (STATUS "sudo apt-get install libqt5quick5")
    endif (NOT QT5Libs)
     
    FIND_LIBRARY (
      ICU_LIBS
      NAMES libicui18n.so
       libicuuc.so
       libicudata.so
      PATHS / usr / local / lib / usr / lib / opt / local / include / usr/lib/i386-linux-gnu /
      )
     
    if (NOT ICU_LIBS)
      message (STATUS "Necessary icu libraries are not found")
         message (STATUS "To install it type in the command line:")
         message (STATUS "sudo apt-get install libicu")
    endif (NOT ICU_LIBS) @
    Libraries are searched , everything you need install. Next, the project should compile plugins using qmake.

    The first question . How can i call qmake of .pro file from CMakeList?( provided that qmake is installed by using apt-get install qt5-qmake and has no links with the necessary modules to it (quick qml) Error : Project error: unknown module (s) in Qt: quick qml)?

    The second question . When we set the Qt SDK - it 's all cool : the modules are searched using find_package (Qt ***), qmake knows where everything is. But the reality is that i install separate packages (this condition) with libraries and there are no ties . How to set them up?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AnatoliyL
      wrote on 24 Sept 2013, 12:47 last edited by
      #2

      qtbase5-dev
      qtdeclarative-dev
      close pls

      1 Reply Last reply
      0

      1/2

      24 Sept 2013, 09:36

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved