Changeset 93 for trunk/m2

Show
Ignore:
Timestamp:
03/16/06 22:22:14 (3 years ago)
Author:
krobillard
Message:

m2 - Individual Qt 4 libraries are now specified.

Location:
trunk/m2
Files:
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/m2/ChangeLog

    r12 r93  
    11                            M2 Change Log 
     2 
     3 
     4V0.4.0 - ?? March 2006 
     5 
     6    * Individual Qt 4 libraries are now specified. 
    27 
    38 
  • trunk/m2/README

    r12 r93  
    1         M2 Version 0.3.1 
     1        M2 Version 0.4.0 
    22 
    33 
  • trunk/m2/m2

    r12 r93  
    44        RCS: {$Id: m2,v 1.16 2005/06/21 05:07:06 karl Exp $} 
    55    Title: "m2" 
    6     Version: 0.3.1 
    7     Rights: "Copyright (C) 2001 Karl Robillard" 
     6    Version: 0.4.0 
     7    Rights: "Copyright (C) 2001-2006 Karl Robillard" 
    88    Author: "Karl Robillard" 
    99        Date: 27-May-2001 
     
    330330 
    331331opengl:   func [{Using OpenGL libraries.}]     [ m2/ct/cfg/opengl: true ] 
    332 qt:       func [{Using Troll Tech's Qt 3.}]    [ m2/ct/cfg/qt: 3 ] 
    333 qt4:      func [{Using Troll Tech's Qt 4.}]    [ m2/ct/cfg/qt: 4 ] 
     332qt3:      func [{Using Troll Tech's Qt 3.}]    [ m2/ct/cfg/qt: 3 ] 
     333qt:       func [{Using Troll Tech's Qt 4.} libs [block!]] [ m2/ct/cfg/qt: libs ] 
    334334x11:      func [{Using X11 libraries.}]        [ m2/ct/cfg/x11: true ] 
    335335 
  • trunk/m2/m2_cygwin.r

    r12 r93  
    6262 
    6363 
     64qt-includes: context [ 
     65   gui:     does [ include_from {$(QTDIR)\include\QtGui} ] 
     66   network: does [ include_from {$(QTDIR)\include\QtNetwork} ] 
     67   opengl:  does [ include_from {$(QTDIR)\include\QtOpenGL} ] 
     68   xml:     does [ include_from {$(QTDIR)\include\QtXml} ] 
     69   svg:     does [ include_from {$(QTDIR)\include\QtSvg} ] 
     70   sql:     does [ include_from {$(QTDIR)\include\QtSql} ] 
     71   support: does [ include_from {$(QTDIR)\include\Qt3Support} 
     72                   cxxflags {-DQT3_SUPPORT} ] 
     73] 
     74 
     75qt-libraries: context [ 
     76   core:    { QtCore4} 
     77   gui:     { QtGui4} 
     78   network: { QtNetwork4} 
     79   opengl:  { QtOpenGL4} 
     80   xml:     { QtXml4} 
     81   svg:     { QtSvg4} 
     82   sql:     { QtSql4} 
     83   support: { Qt3Support4} 
     84   main:    { qtmain} 
     85] 
     86 
     87qt-debug-libraries: context [ 
     88   core:    { QtCored4} 
     89   gui:     { QtGuid4} 
     90   network: { QtNetworkd4} 
     91   opengl:  { QtOpenGLd4} 
     92   xml:     { QtXmld4} 
     93   xml:     { QtXmld4} 
     94   svg:     { QtSvgd4} 
     95   sql:     { QtSqld4} 
     96   support: { Qt3Supportd4} 
     97   main:    { qtmaind} 
     98] 
     99 
     100 
    64101exe_target: make m2/target_env 
    65102[ 
     
    101138 
    102139        if cfg/qt [ 
    103             include_from {$(QTDIR)/include} 
     140            either cfg/qt = 3 [ 
     141                include_from {$(QTDIR)\include} 
     142            ][ 
     143                include_from {$(QTDIR)\include} 
     144                include_from {$(QTDIR)\include\QtCore} 
     145                do bind cfg/qt in qt-includes 'gui 
     146            ] 
    104147            if cfg/release [ 
    105148                cxxflags {-DQT_NO_DEBUG} 
     
    117160        do config 
    118161        if cfg/qt [ 
    119             libs_from %"$(QTDIR)/lib" {qt} 
     162            either cfg/qt = 3 [ 
     163                ;libs_from {$(QTDIR)\lib} {qt} 
     164                ;libs_from {$(QTDIR)\lib} {qt-mt331 qtmain} 
     165                libs_from {$(QTDIR)\lib} {qt-mt qtmain} 
     166 
     167                ; If Qt statically compiled must link with more libs. 
     168                libs {ole32 comdlg32 winspool advapi32 imm32 ws2_32 shell32} 
     169            ][ 
     170                append qt4-libs: copy cfg/qt [core main] 
     171                 
     172                libs_from %"$(QTDIR)/lib"  
     173                    rejoin bind qt4-libs either cfg/debug 
     174                            [in qt-debug-libraries 'gui] 
     175                            [in qt-libraries 'gui] 
     176 
     177                libs {comdlg32 winspool advapi32 shell32 ole32} 
     178            ] 
    120179        ] 
    121180    ] 
  • trunk/m2/m2_linux.r

    r12 r93  
    6161 
    6262 
     63qt-includes: context [ 
     64   gui:     does [ include_from {$(QTDIR)/include/QtGui} ] 
     65   network: does [ include_from {$(QTDIR)/include/QtNetwork} ] 
     66   opengl:  does [ include_from {$(QTDIR)/include/QtOpenGL} ] 
     67   xml:     does [ include_from {$(QTDIR)/include/QtXml} ] 
     68   svg:     does [ include_from {$(QTDIR)/include/QtSvg} ] 
     69   sql:     does [ include_from {$(QTDIR)/include/QtSql} ] 
     70   support: does [ include_from {$(QTDIR)/include/Qt3Support} 
     71                   cxxflags {-DQT3_SUPPORT} ] 
     72] 
     73 
     74qt-libraries: context [ 
     75   core:    { QtCore} 
     76   gui:     { QtGui} 
     77   network: { QtNetwork} 
     78   opengl:  { QtOpenGL} 
     79   xml:     { QtXml} 
     80   svg:     { QtSvg} 
     81   sql:     { QtSql} 
     82   support: { Qt3Support} 
     83] 
     84 
     85qt-debug-libraries: context [ 
     86   core:    { QtCore_debug} 
     87   gui:     { QtGui_debug} 
     88   network: { QtNetwork_debug} 
     89   opengl:  { QtOpenGL_debug} 
     90   xml:     { QtXml} 
     91   xml:     { QtXml_debug} 
     92   svg:     { QtSvg_debug} 
     93   sql:     { QtSql_debug} 
     94   support: { Qt3Support_debug} 
     95] 
     96 
     97 
    6398exe_target: make m2/target_env 
    6499[ 
     
    93128 
    94129        if cfg/qt [ 
    95             either cfg/qt < 4 [ 
     130            either cfg/qt = 3 [ 
    96131                include_from {$(QTDIR)/include} 
    97132            ][ 
    98133                include_from {$(QTDIR)/include} 
    99134                include_from {$(QTDIR)/include/QtCore} 
    100                 include_from {$(QTDIR)/include/QtGui} 
    101                 include_from {$(QTDIR)/include/Qt3Support} 
    102                 cxxflags {-DQT3_SUPPORT} 
     135                do bind cfg/qt in qt-includes 'gui 
    103136            ] 
    104137            if cfg/release [ 
     
    117150        do config 
    118151        if cfg/qt [ 
    119             either cfg/qt < 4 [ 
     152            either cfg/qt = 3 [ 
    120153                libs_from %"$(QTDIR)/lib" {qt-mt} 
     154 
    121155                ; Linking statically requires more libs. 
    122156                ;libs_from %"$(QTDIR)/lib" {qt} 
     
    124158                ;libs {freetype dl} 
    125159            ][ 
    126                 libs_from %"$(QTDIR)/lib" {QtGui Qt3Support QtCore} 
     160                append qt4-libs: copy cfg/qt 'core 
     161                 
     162                libs_from %"$(QTDIR)/lib"  
     163                    rejoin bind qt4-libs either cfg/debug 
     164                            [in qt-debug-libraries 'gui] 
     165                            [in qt-libraries 'gui] 
    127166            ] 
    128167        ] 
  • trunk/m2/m2_macx.r

    r12 r93  
    2828        t/built_obj_rule: t/make_obj_rule 
    2929 
    30         if t/cfg/qt == 4 [ 
     30        if t/cfg/qt <> 3 [ 
    3131            moc_exe: {moc}  ; /usr/bin/moc-4.0 
    3232        ] 
     
    6666 
    6767 
     68qt-includes: context [ 
     69   gui:     does [include_from {/Library/Frameworks/QtGui.framework/Headers} 
     70                  lflags   {-framework QtGui}] 
     71   network: does [include_from {/Library/Frameworks/QtNetwork.framework/Headers} 
     72                  lflags   {-framework QtNetwork}] 
     73   opengl:  does [include_from {/Library/Frameworks/QtOpenGL.framework/Headers} 
     74                  lflags   {-framework QtOpenGL}] 
     75   xml:     does [include_from {/Library/Frameworks/QtXml.framework/Headers} 
     76                  lflags   {-framework QtXml}] 
     77   svg:     does [include_from {/Library/Frameworks/QtSvg.framework/Headers} 
     78                  lflags   {-framework QtSvg}] 
     79   sql:     does [include_from {/Library/Frameworks/QtSql.framework/Headers} 
     80                  lflags   {-framework QtSql}] 
     81   support: does [ 
     82       include_from {/Library/Frameworks/Qt3Support.framework/Headers} 
     83       cxxflags {-DQT3_SUPPORT} 
     84       lflags   {-framework Qt3Support } 
     85   ] 
     86] 
     87 
     88 
    6889exe_target: make m2/target_env 
    6990[ 
     
    97118 
    98119        if cfg/qt [ 
    99             either cfg/qt < 4 [ 
     120            either cfg/qt = 3 [ 
    100121                include_from {$(QTDIR)/include} 
    101122            ][ 
    102                 include_from {/Library/Frameworks/QtGui.framework/Headers} 
    103123                include_from {/Library/Frameworks/QtCore.framework/Headers} 
     124                lflags {-framework QtCore} 
     125                do bind cfg/qt in qt-includes 'gui 
    104126            ] 
    105127            if cfg/release [ 
     
    118140        do config 
    119141        if cfg/qt [ 
    120             either cfg/qt < 4 [ 
     142            if cfg/qt = 3 [ 
    121143                libs_from %"$(QTDIR)/lib" {qt} 
    122144                ; If Qt is compiled as a static library. 
    123145                lflags {-framework carbon -lz} 
    124             ][ 
    125                     lflags {-bind_at_load -framework QtGui -framework QtCore} 
    126                 lflags {-framework carbon} 
    127146            ] 
     147            ;[ 
     148                ;    lflags {-bind_at_load -framework QtGui -framework QtCore} 
     149            ;    lflags {-framework carbon} 
     150            ;] 
    128151        ] 
    129152    ] 
  • trunk/m2/m2_sun.r

    r12 r93  
    11REBOL [ 
    22    Title: "m2 Solaris-g++ template" 
    3     Notes: "Only tested on Solaris 8" 
    43] 
    54 
     
    6261 
    6362 
     63qt-includes: context [ 
     64   gui:     does [ include_from {$(QTDIR)/include/QtGui} ] 
     65   network: does [ include_from {$(QTDIR)/include/QtNetwork} ] 
     66   opengl:  does [ include_from {$(QTDIR)/include/QtOpenGL} ] 
     67   xml:     does [ include_from {$(QTDIR)/include/QtXml} ] 
     68   svg:     does [ include_from {$(QTDIR)/include/QtSvg} ] 
     69   sql:     does [ include_from {$(QTDIR)/include/QtSql} ] 
     70   support: does [ include_from {$(QTDIR)/include/Qt3Support} 
     71                   cxxflags {-DQT3_SUPPORT} ] 
     72] 
     73 
     74qt-libraries: context [ 
     75   core:    { QtCore} 
     76   gui:     { QtGui} 
     77   network: { QtNetwork} 
     78   opengl:  { QtOpenGL} 
     79   xml:     { QtXml} 
     80   svg:     { QtSvg} 
     81   sql:     { QtSql} 
     82   support: { Qt3Support} 
     83] 
     84 
     85qt-debug-libraries: context [ 
     86   core:    { QtCore_debug} 
     87   gui:     { QtGui_debug} 
     88   network: { QtNetwork_debug} 
     89   opengl:  { QtOpenGL_debug} 
     90   xml:     { QtXml_debug} 
     91   svg:     { QtSvg_debug} 
     92   sql:     { QtSql_debug} 
     93   support: { Qt3Support_debug} 
     94] 
     95 
     96 
    6497exe_target: make m2/target_env 
    6598[ 
     
    94127 
    95128        if cfg/qt [ 
    96             include_from {$(QTDIR)/include} 
     129            either cfg/qt = 3 [ 
     130                include_from {$(QTDIR)/include} 
     131            ][ 
     132                include_from {$(QTDIR)/include} 
     133                include_from {$(QTDIR)/include/QtCore} 
     134                do bind cfg/qt in qt-includes 'gui 
     135            ] 
    97136            if cfg/release [ 
    98137                cxxflags {-DQT_NO_DEBUG} 
     
    110149        do config 
    111150        if cfg/qt [ 
    112             ;libs_from %"$(QTDIR)/lib" {qt-mt} 
    113             ; Linking statically requires more libs. 
    114             libs_from %"$(QTDIR)/lib" {qt} 
    115             libs_from %/usr/X/lib {SM Xext X11 ICE} 
    116             libs {dl} 
     151            either cfg/qt = 3 [ 
     152                ;libs_from %"$(QTDIR)/lib" {qt-mt} 
     153 
     154                ; Linking statically requires more libs. 
     155                libs_from %"$(QTDIR)/lib" {qt} 
     156                libs_from %/usr/X/lib {SM Xext X11 ICE} 
     157                libs {dl} 
     158            ][ 
     159                append qt4-libs: copy cfg/qt 'core 
     160                 
     161                libs_from %"$(QTDIR)/lib"  
     162                    rejoin bind qt4-libs either cfg/debug 
     163                            [in qt-debug-libraries 'gui] 
     164                            [in qt-libraries 'gui] 
     165            ] 
    117166        ] 
    118167    ] 
  • trunk/m2/m2_visualc.r

    r12 r93  
    5858 
    5959 
     60qt-includes: context [ 
     61   gui:     does [ include_from {$(QTDIR)\include\QtGui} ] 
     62   network: does [ include_from {$(QTDIR)\include\QtNetwork} ] 
     63   opengl:  does [ include_from {$(QTDIR)\include\QtOpenGL} ] 
     64   xml:     does [ include_from {$(QTDIR)\include\QtXml} ] 
     65   svg:     does [ include_from {$(QTDIR)\include\QtSvg} ] 
     66   sql:     does [ include_from {$(QTDIR)\include\QtSql} ] 
     67   support: does [ include_from {$(QTDIR)\include\Qt3Support} 
     68                   cxxflags {-DQT3_SUPPORT} ] 
     69] 
     70 
     71qt-libraries: context [ 
     72   core:    { QtCore4} 
     73   gui:     { QtGui4} 
     74   network: { QtNetwork4} 
     75   opengl:  { QtOpenGL4} 
     76   xml:     { QtXml4} 
     77   svg:     { QtSvg4} 
     78   sql:     { QtSql4} 
     79   support: { Qt3Support4} 
     80   main:    { qtmain} 
     81] 
     82 
     83qt-debug-libraries: context [ 
     84   core:    { QtCored4} 
     85   gui:     { QtGuid4} 
     86   network: { QtNetworkd4} 
     87   opengl:  { QtOpenGLd4} 
     88   xml:     { QtXmld4} 
     89   xml:     { QtXmld4} 
     90   svg:     { QtSvgd4} 
     91   sql:     { QtSqld4} 
     92   support: { Qt3Supportd4} 
     93   main:    { qtmaind} 
     94] 
     95 
     96 
    6097exe_target: make m2/target_env 
    6198[ 
     
    68105 
    69106        cflags {/nologo} 
    70         ;cflags {/MD}        ; Creates a multithreaded DLL using MSVCRT.lib 
    71107        cxxflags {-GX} 
    72108        lflags {/nologo /incremental:no} 
     
    87123 
    88124        if cfg/debug [ 
     125            cflags {/MDd} 
    89126            cflags {-Zi -DDEBUG} 
    90127            lflags {/DEBUG} 
     
    92129 
    93130        if cfg/release [ 
     131            cflags {/MD} 
    94132            cflags {-O1 -DNDEBUG} 
    95133        ] 
     
    100138 
    101139        if cfg/qt [ 
    102             include_from {$(QTDIR)\include} 
    103             if cfg/qt >= 4 [ 
     140            either cfg/qt = 3 [ 
     141                include_from {$(QTDIR)\include} 
     142            ][ 
     143                include_from {$(QTDIR)\include} 
    104144                include_from {$(QTDIR)\include\QtCore} 
    105                 include_from {$(QTDIR)\include\QtGui} 
    106                 ;include_from {$(QTDIR)\include\Qt3Support} 
    107                 ;cxxflags {-DQT3_SUPPORT} 
     145                do bind cfg/qt in qt-includes 'gui 
    108146            ] 
    109147            if cfg/release [ 
     
    122160        do config 
    123161        if cfg/qt [ 
    124             either cfg/qt < 4 [ 
     162            either cfg/qt = 3 [ 
    125163                ;libs_from {$(QTDIR)\lib} {qt} 
    126164                ;libs_from {$(QTDIR)\lib} {qt-mt331 qtmain} 
    127165                libs_from {$(QTDIR)\lib} {qt-mt qtmain} 
     166 
    128167                ; If Qt statically compiled must link with more libs. 
    129168                libs {ole32 comdlg32 winspool advapi32 imm32 ws2_32 shell32} 
    130169            ][ 
    131               either cfg/debug [ 
    132                 libs_from %"$(QTDIR)\lib" {QtGuid4 QtCored4 qtmaind} 
    133               ][ 
    134                 ;libs_from %"$(QTDIR)\lib" {QtGui4 Qt3Support QtCore4 qtmain} 
    135                 libs_from %"$(QTDIR)\lib" {QtGui4 QtCore4 qtmain} 
    136               ] 
    137               libs {comdlg32 winspool advapi32 shell32 ole32} 
     170                append qt4-libs: copy cfg/qt [core main] 
     171                 
     172                libs_from %"$(QTDIR)/lib"  
     173                    rejoin bind qt4-libs either cfg/debug 
     174                            [in qt-debug-libraries 'gui] 
     175                            [in qt-libraries 'gui] 
     176 
     177                libs {comdlg32 winspool advapi32 shell32 ole32} 
    138178            ] 
    139179        ]