Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. 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.

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lygstate
    wrote on last edited by
    #1

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

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • L Offline
        L Offline
        lygstate
        wrote on last edited by
        #3

        @
        #-------------------------------------------------

        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

        @

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved