| 
            Last change
 on this file since 324 was             310, checked in by Dmitry A. Kuminov, 16 years ago           | 
        
        
          | 
             
tests: Added support for RUN_ARGS qmake variable in run make targets that allows to specify arguments for the target executable. 
 
           | 
        
        
          | 
            File size:
            1.1 KB
           | 
        
      
      
| Line |   | 
|---|
| 1 | isEmpty(DEPTH):DEPTH = .
 | 
|---|
| 2 | 
 | 
|---|
| 3 | os2:PLATFORM        = os2
 | 
|---|
| 4 | else:win32:PLATFORM = win
 | 
|---|
| 5 | else:x11:PLATFORM   = x11
 | 
|---|
| 6 | else:PLATFORM       = unknown
 | 
|---|
| 7 | 
 | 
|---|
| 8 | # in debug_and_release, we need a -debug or -release suffix to get separate
 | 
|---|
| 9 | # output paths (it will be replaced with the correct one at runtime)
 | 
|---|
| 10 | debug_and_release:OUTPATH_SUFFIX = -debug
 | 
|---|
| 11 | else:OUTPATH_SUFFIX =
 | 
|---|
| 12 | 
 | 
|---|
| 13 | OBJECTS_DIR = $$DEPTH/obj/$${PLATFORM}$${OUTPATH_SUFFIX}
 | 
|---|
| 14 | MOC_DIR = $$OBJECTS_DIR
 | 
|---|
| 15 | DESTDIR = $$OBJECTS_DIR
 | 
|---|
| 16 | 
 | 
|---|
| 17 | # target.path isn't there by default
 | 
|---|
| 18 | QMAKE_DIR_REPLACE = OBJECTS_DIR MOC_DIR RCC_DIR target.path
 | 
|---|
| 19 | 
 | 
|---|
| 20 | target.path = $$DEPTH/bin/$${PLATFORM}$${OUTPATH_SUFFIX}
 | 
|---|
| 21 | INSTALLS += target
 | 
|---|
| 22 | 
 | 
|---|
| 23 | !build_pass {
 | 
|---|
| 24 |         debug-run.target = debug-run
 | 
|---|
| 25 |         debug-run.commands = $(MAKE) -f $(MAKEFILE).Debug run
 | 
|---|
| 26 |         release-run.target = release-run
 | 
|---|
| 27 |         release-run.commands = $(MAKE) -f $(MAKEFILE).Release run
 | 
|---|
| 28 |         QMAKE_EXTRA_TARGETS += debug-run release-run
 | 
|---|
| 29 | } else {
 | 
|---|
| 30 |         run.target = run
 | 
|---|
| 31 |         run.commands = $(DESTDIR_TARGET) $$RUN_ARGS
 | 
|---|
| 32 |         run.depends = $(DESTDIR_TARGET) 
 | 
|---|
| 33 |         QMAKE_EXTRA_TARGETS += run
 | 
|---|
| 34 | }
 | 
|---|
| 35 | 
 | 
|---|
| 36 | win32 {
 | 
|---|
| 37 |         CONFIG(release, debug|release):CONFIG(qt):contains(QT, gui) {
 | 
|---|
| 38 |                 CONFIG -= console
 | 
|---|
| 39 |                 CONFIG *= windows
 | 
|---|
| 40 |         } else {
 | 
|---|
| 41 |                 CONFIG -= windows
 | 
|---|
| 42 |                 CONFIG *= console
 | 
|---|
| 43 |         }       
 | 
|---|
| 44 | }
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.