[cmake-developers] How should Mac frameworks work?

Clinton Stimpson clinton at elemtech.com
Tue Jul 2 11:35:40 EDT 2013


On Tuesday, July 02, 2013 05:12:00 PM Stephen Kelly wrote:
> Clinton Stimpson wrote:
> > Yeah, I understand that is the issue.
> > I don't quite get what is new for Qt 5.1.  I thought Qt 4.x only installed
> > Qt headers inside the framework too.  Perhaps its new from 5.0 to 5.1?
> 
> Yes.
> 
> > On a Mac with a prebuilt Qt 4.7
> > qmake -query QT_INSTALL_HEADERS => /usr/include
> > The only Qt headers under there are the headers for the QtUiTools module
> > which is a static library and not a framework.
> > That is why we had this in FindQt4.cmake/UseQt4.cmake
> > include_directories("/path/to/QtCore.framework;/usr/include")
> > which produced a "-F/path/to" and "-I/usr/include" compile flags.
> 
> Ok, so maybe what I need is to add the path to the framework to the
> INTERFACE_INCLUDE_DIRECTORIES of each target?

Yes, I think that makes sense.

> 
> As a feature, would it make sense to make that unnecessary in a future CMake
> version?
> 

How would you make it unecessary?
Would you change CMake so the include directory would automatically be 
included for frameworks specified in target_link_libraries()?  That does sound 
like something CMake could do automatically.

Clint



More information about the cmake-developers mailing list