Opened 13 years ago

Last modified 13 years ago

#3767 new Feature Requests

Support for Frameworks on OSX + Qt4

Reported by: Sohail Somani Owned by: Vladimir Prus
Milestone: Boost 1.42.0 Component: build
Version: Boost 1.41.0 Severity: Not Applicable
Keywords: Cc: boost-trac@…

Description

When using Cocoa with Qt4.5 onwards, we need to use the Qt framework bundles rather than linking to the dynamic libraries. This is because a NIB file needs to be loaded to properly handle menus.

I think a new feature qt-cocoa (yes/no) would be enough from the user's point of view.

I can provide testing if needed. I tried to add it myself but failed miserably!

Change History (4)

comment:1 by Sohail Somani, 13 years ago

Cc: boost-trac@… added

comment:2 by Sohail Somani, 13 years ago

Here is how I am currently using the Qt framework (4.6.0) with Boost Jam:

project gui ;
import qt4 ;
import os ;

if [ os.name ] = "MACOSX"
{
        local QTDIR = [ qt4.directory ] ;

        alias QtCommon
              :
              :
              :
              : 
              <include>$(QTDIR)/mkspecs/macx-g++ 
              <include>$(QTDIR)/include
              <define>QT_NO_DEBUG 
              <define>QT_SHARED
              <cxxflags>-F$(QTDIR)/lib
              ;

        local rule def-qt-framework ( qtlib : dependencies * )
        {
                local def = [ MATCH ..(.*) : $(qtlib:U) ] ; # QtCore -> CORE
                alias $(qtlib)
                      : QtCommon $(dependencies)
                      :
                      :
                      :
                      <framework>$(QTDIR)/lib/$(qtlib)
                      <include>$(QTDIR)/lib/$(qtlib).framework/Versions/4/Headers
                      <include>$(QTDIR)/include/$(qtlib)
                      <define>QT_$(def)_LIB
                      ;
        }               

        def-qt-framework QtCore ;
        def-qt-framework QtGui : QtCore ;
}
# Otherwise we will use qt4 definitions

comment:3 by Vladimir Prus, 13 years ago

Component: bjambuild
Owner: changed from René Rivera to Vladimir Prus

comment:4 by Sohail Somani, 13 years ago

There should be an <allow>qt4 after <cxxflags> in QtCommon

Note: See TracTickets for help on using tickets.