Ignore:
Timestamp:
Oct 8, 2008, 3:36:01 AM (16 years ago)
Author:
garnier
Message:

GLQT best integration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/config/sys/Darwin-g++.gmk

    r855 r865  
    6363  ifndef OGLLIBS
    6464    OGLLIBS   := -L$(OGLHOME)/lib -lGLU -lGL
    65 # Uncomment the following lines for building on MacOSX 10.5 "Leopard"
     65# It may be required to uncomment the following lines for building on MacOSX 10.5 "Leopard"
    6666#    OGLLIBS   += -dylib_file \
    6767#                 /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:\
     
    7171    QTHOME     := /sw
    7272  endif
     73
     74  QT_VERSION   := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo QT3 || echo QT4)
     75
    7376  ifndef QTFLAGS
    74     QTFLAGS    := -I$(QTHOME)/include/Qt -I$(QTHOME)/include
     77    ifeq ($(QT_VERSION),QT4)
     78      QTFLAFG   := "-I ${QTHOME}/QtCore.framework/Headers "
     79      QTFLAFG   += "-I ${QTHOME}/QtGui.framework/Headers "
     80      QTFLAFG   += "-I ${QTHOME}/QtOpenGL.framework/Headers "
     81      QTFLAFG   += "-I ${QTHOME}/QtSql.framework/Headers "
     82      QTFLAFG   += "-I ${QTHOME}/QtXml.framework/Headers "
     83    else
     84      QTFLAGS   := -I$(QTHOME)/include/Qt -I$(QTHOME)/include
     85    endif
    7586  endif
    7687  ifndef QTMOC
    77     QTMOC      := $(QTHOME)/bin/moc
     88    ifeq ($(QT_VERSION),QT4)
     89      QTMOC      := /usr/bin/moc
     90    else
     91      QTMOC      := $(QTHOME)/bin/moc
     92    endif
    7893  endif
    7994  ifndef QTLIBS
    80     QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
    81     QT4LIBS    := -F$(QTHOME)/lib -framework QtCore -framework QtGui
    82     QT4LIBS    += -framework QtSql -framework QtXml
    83     QTLIBS     := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
     95    ifeq ($(QT_VERSION),QT3)
     96      QTLIBS    := -L$(QTHOME)/lib -lqt -lqui
     97    else
     98      QTLIBS    := -F$(QTHOME) -framework QtCore -framework QtGui
     99      QTLIBS    += -framework QtSql -framework QtXml
     100    endif
    84101  endif
    85102
    86103  ifndef GLQTLIBS
    87     QT3LIBS    := -L$(QTHOME)/lib -lqt -lqui
    88     QT4LIBS    := -F$(QTHOME) -framework QtCore -framework QtGui
    89     QT4LIBS    += -framework QtOpenGL -framework QtSql -framework QtXml
    90     GLQTLIBS   := $(shell test -f $(QTHOME)/Qt3Support.framework/Qt3Support && echo $(QT4LIBS) || echo $(QT3LIBS))
     104    ifeq ($(QT_VERSION),QT3)
     105      GLQTLIBS    := -L$(QTHOME)/lib -lqt -lqui
     106    else
     107      GLQTLIBS    := -F$(QTHOME) -framework QtCore -framework QtGui
     108      GLQTLIBS    += -framework QtOpenGL -framework QtSql -framework QtXml
     109    endif
    91110  endif
    92111
Note: See TracChangeset for help on using the changeset viewer.