Giter VIP home page Giter VIP logo

Comments (7)

drizt avatar drizt commented on August 14, 2024

I dump all properties for Qt5::Gui and one from them:

Qt5::Gui INTERFACE_INCLUDE_DIRECTORIES = /usr/include/qt5/;/usr/include/qt5/QtGui;/usr/include

Also I opened CMake sources. They exclude /usr/include. https://github.com/Kitware/CMake/blob/master/Source/cmLocalGenerator.cxx#L964

from cmakepchcompiler.

nanoant avatar nanoant commented on August 14, 2024

@drizt Hi, thanks for the root cause analysis. Can you please let me know if removing /usr/include from Qt's INTERFACE_INCLUDE_DIRECTORIES fixes the problem? If yes, I believe it is Qt to be blamed not CMakePCHCompiler.
Apparently CMake there at https://github.com/Kitware/CMake/blob/master/Source/cmLocalGenerator.cxx#L964 hardcodes some bugfix, which is obviously not affecting CXXPCH & CPCH derived PCH languages.

from cmakepchcompiler.

drizt avatar drizt commented on August 14, 2024

Yes. For Qt5 I use such workaround:

  get_target_property(Qt5GuiIncDirs Qt5::Gui INTERFACE_INCLUDE_DIRECTORIES)
  list(REMOVE_ITEM Qt5GuiIncDirs "/usr/include")
  set_target_properties(Qt5::Gui PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Qt5GuiIncDirs}")

And this for Qt4:

  get_target_property(Qt4GuiIncDirs Qt4::QtGui INTERFACE_INCLUDE_DIRECTORIES)
  list(REMOVE_ITEM Qt4GuiIncDirs "/usr/include")
  set_target_properties(Qt4::QtGui PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Qt4GuiIncDirs}")

  get_target_property(Qt4CoreIncDirs Qt4::QtCore INTERFACE_INCLUDE_DIRECTORIES)
  list(REMOVE_ITEM Qt4CoreIncDirs "/usr/include")
  set_target_properties(Qt4::QtCore PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${Qt4CoreIncDirs}")

  list(REMOVE_ITEM QT_INCLUDE_DIR "/usr/include")

from cmakepchcompiler.

drizt avatar drizt commented on August 14, 2024

You use non-standard lang for pch header. It's very rare case. I think this problem can happens in other cases not only mine. Maybe this information should be add to README or there is a way to workaround it in your CMakePCHCompiler?

from cmakepchcompiler.

drizt avatar drizt commented on August 14, 2024

Open an issue on Qt bugtracker.

from cmakepchcompiler.

nanoant avatar nanoant commented on August 14, 2024

Okay, thanks for the update. Do you think we should keep this issue open or we can close it now?

from cmakepchcompiler.

nanoant avatar nanoant commented on August 14, 2024

This was very likely fixed by fa975ba and looks similar to #36, anyways the example in Tests/Issue36_QTFramework now works.

from cmakepchcompiler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.