How to set different DEFINES for different set of SOURCES in qmake files.



  • How to set different DEFINES for different set of SOURCES in qmake files.



  • HI, can you show us some of your .pro file to explain what "different set of SOURCES" mean?



  • @
    #-------------------------------------------------

    Project created by QtCreator 2013-07-01T10:29:37

    #-------------------------------------------------

    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = gmss
    TEMPLATE = app

    DEFINES += WINVER=0x0500
    DEFINES -= UNICODE
    DEFINES += _AFXDLL
    QMAKE_LIBS_QT_ENTRY =

    //The first set of source codes
    HEADERS += gis/gisdlgdemo.h gis/gisdlgdemodlg.h gis/resource.h gis/stdafx.h
    SOURCES += gis/cgis_mainctrl.cpp gis/gisdlgdemo.cpp gis/gisdlgdemodlg.cpp gis/stdafx.cpp
    RC_FILE += gis/dlgdemo.rc

    include(../deps/qt-solutions/qtwinmigrate/src/qtwinmigrate.pri)

    win32 {
    INCLUDEPATH += "$$(ProgramFiles)\GIS-II\include"
    DEPENDPATH += "$$(ProgramFiles)\GIS-II\include"
    QMAKE_LIBDIR += "$$(ProgramFiles)\GIS-II\lib"
    LIBS += gis_doc.lib gf_maincontroller.lib
    }

    //The second set of source codes

    SOURCES += main.cpp
    MainWidget.cpp
    MainWindow.cpp
    MainMenu.cpp
    MapWidget.cpp
    ButtonArea.cpp

    HEADERS += MainWidget.h
    MainWindow.h
    MainMenu.h
    MapWidget.h
    ButtonArea.h

    FORMS +=
    MainWidget.ui
    MainWindow.ui
    MainMenu.ui
    ButtonArea.ui

    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.