[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kdevelop-bugs
Subject:    [Bug 137768] New: A concept of qmake project organization
From:       Steven T.Hatton <hattons () globalsymmetry ! com>
Date:       2006-11-23 10:22:40
Message-ID: 20061123112239.137768.hattons () globalsymmetry ! com
[Download RAW message or body]

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=137768         
           Summary: A concept of qmake project organization
           Product: kdevelop
           Version: unspecified
          Platform: SuSE RPMs
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: wishlist
          Priority: NOR
         Component: general
        AssignedTo: kdevelop-bugs kdevelop org
        ReportedBy: hattons globalsymmetry com


Version:           revision 607130 (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs

This is the tree of a very simple project organized (almost) the way I like it.

> -- COPYING
> -- Doxyfile
> -- Makefile
> -- bin
> `-- qsg
> -- build
> > -- Makefile
> > -- build.pro
> > -- qsg
> > > -- MainWindow.o
> > > -- Makefile
> > > -- libqsg.prl
> > > -- moc_MainWindow.cpp
> > > -- moc_MainWindow.o
> > > -- qsg
> > `-- qsg.pro
> `-- qsgmain
> > -- Makefile
> > -- main.o
> `-- qsgmain.pro
> -- include
> `-- qsg
> > -- MainWindow
> `-- MainWindow.h
> -- lib
> > -- libqsg.prl
> > -- libqsg.so -> libqsg.so.1.0.0
> > -- libqsg.so.1 -> libqsg.so.1.0.0
> > -- libqsg.so.1.0 -> libqsg.so.1.0.0
> `-- libqsg.so.1.0.0
> -- main.cpp
> -- project.pro
> -- project.pro~
> -- qsg.kdevelop
> -- qsg.kdevelop.pcs
> -- qsg.kdevses
> -- qsg.pro
> -- setpaths
> -- src
> > -- qsg
> > `-- MainWindow.cpp
> `-- qsgmain
> `-- main.cpp
`-- templates
    |-- cpp
    `-- h
##################################
#project.pro
# include this file in the subdirectory's .pro after BASE_DIR and TARGET are defined
PROJECT_ROOT     = /home/hattons/code/c++/gs/qsg/
PROJECT_INCLUDE  = $$PROJECT_ROOT/include
PROJECT_SOURCE   = $$PROJECT_ROOT/src
PROJECT_LIBRARY  = $$PROJECT_ROOT/lib
PROJECT_BINARY   = $$PROJECT_ROOT/bin
PROJECT_PLUGIN   = $$PROJECT_ROOT/plugin
PROJECT_DOCUMENT = $$PROJECT_ROOT/doc
PROJECT_TMP      = $$PROJECT_ROOT/tmp


INCLUDEPATH += $$PROJECT_INCLUDE
LIBS        += -L$$PROJECT_LIBRARY

CONFIG += debug
CONFIG += warn_on
CONFIG += qt
CONFIG += link_prl

contains(TEMPLATE, lib) {
  CONFIG += create_prl
  DESTDIR = $$PROJECT_LIBRARY
  contains(CONFIG, plugin) {
    DESTDIR = $$PROJECT_PLUGIN
  }
}

contains(TEMPLATE, app) {
  DESTDIR = $$PROJECT_BINARY
}

SRC = $$PROJECT_SOURCE/$$BASE_DIR
HDR = $$PROJECT_INCLUDE/$$BASE_DIR
########### END PROJECT.PRO ##########

####################################
#$$PROJECT_ROOT/qsg.pro
TEMPLATE = subdirs
SUBDIRS  = build
######### END $$PROJECT_ROOT/qsg.pro ######

#######################################
#build.pro
TEMPLATE = subdirs
SUBDIRS  = qsg
SUBDIRS += qsgmain
############### END build.pro ##############

############################################
# build/qsg/qsg.pro
BASE_DIR = qsg
TEMPLATE = lib
TARGET   = $$BASE_DIR
include(../../project.pro)
HEADERS += $$HDR/MainWindow.h
SOURCES += $$SRC/MainWindow.cpp
############### END build/qsg/qsg.pro ##############

############################################
#build/qsgmain/qsgmain.pro
BASE_DIR = qsgmain
TEMPLATE = app

include(../../project.pro)

TARGET   = qsg
LIBS += -lqsg

SOURCES += $$SRC/main.cpp
######### END build/qsgmain/qsgmain.pro #########

It would be nice if QMakeManager supported that approach more naturally. I can make \
it work, but it makes adding new files to the project cumbersome, and I have to \
replace a lot of the variables with explicit values in order to get the GUI to show \
the files in the manager frame.

Also, I source a file before starting kdevelop:

$ cat setpaths 
export QSG_HOME=/home/hattons/code/c++/gs/qsg
PATH=$QSG_HOME/bin:$PATH
LIBRARY_PATH=$QSG_HOME/lib:$LIBRARY_PATH
LD_LIBRARY_PATH=$QSG_HOME/lib:$LD_LIBRARY_PATH

That's so the app will run once it's built.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic