https://bugs.kde.org/show_bug.cgi?id=374751

            Bug ID: 374751
           Summary: qmake project manager: incorrect targets on Mac
           Product: kdevelop
           Version: git master
          Platform: Other
                OS: OS X
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Build tools: QMake
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Normally QMake .pro files will build applications as app bundles on Mac,
regardless of whether macdeployqt is used to create standalone bundles or not.

For instance, the "menus" Qt example has the following menus.pro file:

    QT += widgets
    HEADERS       = mainwindow.h
    SOURCES       = mainwindow.cpp \
                    main.cpp
    # install
    target.path = $$[QT_INSTALL_EXAMPLES]/widgets/mainwindows/menus
    INSTALLS += target

Running qmake on it will create a Makefile that contains the following:

    QMAKE_TARGET  = menus
    DESTDIR       = 
    TARGET        = menus.app/Contents/MacOS/menus
    first: all
    ####### Build rules
    $(TARGET):  $(OBJECTS)  
         @test -d menus.app/Contents/MacOS/ || mkdir -p
menus.app/Contents/MacOS/
         $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

The qmake project manager still picks up the QMAKE_TARGET short name. Evidently
a failure occurs when it tries to invoke `make menus` instead of `make
menus.app/Contents/MacOS/menus`.

This also makes it impossible to update a project before running one of its
build targets.

Handling this is not completely trivial as it *is* possible to tell QMake to
generate traditional executables on Mac.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to