Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QtMobility include directory problems with CMake

QtMobility include directory problems with CMake

Scheduled Pinned Locked Moved Installation and Deployment
2 Posts 1 Posters 2.0k Views
  • 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.
  • G Offline
    G Offline
    goocreations
    wrote on last edited by
    #1

    I’m using CMake to make my makefiles. I’m using QtMobility in my project, but I constantly get an error that qmobilityglobal.h cannot be found. I’m including the headers directory (/usr/include/QtMobility) and I’ve looked, the file is located in that directory. I then copied the header file from /usr/include/QtMobility to /usr/include and only included /usr/include in CMake. I’ve compiled and vola, the build succeded.
    I’ve then tested again with the /usr/include/QtMobility directory, but instead of doing this in my C++ code (Option 1):
    @#include <qmobilityglobal.h>@
    I'm no doing this (Option 2):
    @#include <QtMobility/qmobilityglobal.h>@
    And this also worked 100%.

    The problem I have is that all the Qt header files include related Qt files like option 1 and not option 2 and that gives me a lot of compile errors. I also don’t want to go and change all the header files in QtMobility.

    Does anyone know why this is and if there is an easy way of fixing this with my cmake file?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goocreations
      wrote on last edited by
      #2

      Ok this is weird, if I put the include statment in the root CMakeLists.txt file, it works. So it rather seems like a CMake problem than a Qt problem.

      Sorry for posting here.

      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