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. Cmake and Qt library paths
Forum Updated to NodeBB v4.3 + New Features

Cmake and Qt library paths

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.7k 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.
  • T Offline
    T Offline
    theunsheydenrych
    wrote on last edited by
    #1

    Hi
    I have Qt project that i would like to compile with cmake.
    When compiling it gives the following error.

    make[2]: *** No rule to make target `/usr/lib/libQtXml.so'

    libQtXml.so is available in the following directory /usr/lib/x86_64-linux-gnu/libQtXml.so.4.8

    In the CMakeLists.txt file is a section that is supposed to find the correct location.
    search for Qt4
    @SET(QT_MIN_VERSION 4.4.0)
    FIND_PACKAGE(Qt4 ${QT_MIN_VERSION} REQUIRED)
    SET(QT_USE_QTXML 1)
    SET(QT_USE_QTNETWORK 1)
    SET(QT_USE_QTSVG 1)
    SET(QT_USE_QTSQL 1)
    SET(QT_USE_QTWEBKIT 1)

    IF (NOT QT_QTXML_FOUND OR NOT QT_QTNETWORK_FOUND OR NOT QT_QTSVG_FOUND OR NOT QT_QTSQL_FOUND OR NOT QT_QTWEBKIT_FOUND)
    MESSAGE(SEND_ERROR "Some Qt4 modules haven't been found!")
    ENDIF ()

    INCLUDE( ${QT_USE_FILE} )@

    But when running the ccmake in the terminal and look at all the variables it states the path as /usr/lib/libQtXml.so

    What do i have to do/change so that it will find the Qt libs in the correct place?

    Thanks in advance

    1 Reply Last reply
    0
    • T Offline
      T Offline
      tilsitt
      wrote on last edited by
      #2

      Hi,

      instead of:
      @
      FIND_PACKAGE(Qt4 ${QT_MIN_VERSION} REQUIRED)
      SET(QT_USE_QTXML 1)
      SET(QT_USE_QTNETWORK 1)
      SET(QT_USE_QTSVG 1)
      SET(QT_USE_QTSQL 1)
      SET(QT_USE_QTWEBKIT 1)
      @

      try:
      @
      SET(QT_USE_QTXML 1)
      SET(QT_USE_QTNETWORK 1)
      SET(QT_USE_QTSVG 1)
      SET(QT_USE_QTSQL 1)
      SET(QT_USE_QTWEBKIT 1)
      FIND_PACKAGE(Qt4 ${QT_MIN_VERSION} REQUIRED)
      @

      1 Reply Last reply
      0

      • Login

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