From fadf5eb9269567ad55c93ee04ec2c4e80a3a2daa Mon Sep 17 00:00:00 2001 From: nds Date: Mon, 27 Oct 2008 09:12:34 +0000 Subject: [PATCH] A possibility to choose the debug or release compilation modes. --- src/Common.pro | 10 ++++++++++ src/OBJECT/OBJECT.pro | 5 ++--- src/ObjBrowser/ObjBrowser.pro | 5 ++--- src/Plot2d/Plot2d.pro | 5 ++--- src/Prs/Prs.pro | 5 ++--- src/PyConsole/PyConsole.pro | 14 ++++++++++---- src/PyInterp/PyInterp.pro | 13 +++++++++---- src/Qtx/Qtx.pro | 4 ++-- src/STD/STD.pro | 5 ++--- src/SUIT/SUIT.pro | 5 ++--- src/SUITApp/SUITApp.pro | 4 +--- src/SVTK/SVTK.pro | 5 ++--- src/Style/Style.pro | 5 ++--- src/TableViewer/TableViewer.pro | 5 ++--- src/VTKViewer/VTKViewer.pro | 5 ++--- 15 files changed, 52 insertions(+), 43 deletions(-) create mode 100644 src/Common.pro diff --git a/src/Common.pro b/src/Common.pro new file mode 100644 index 000000000..444506608 --- /dev/null +++ b/src/Common.pro @@ -0,0 +1,10 @@ +CONFIG -= debug release debug_and_release +CONFIG += qt thread dll shared + +CONFIG_MODE= $$(CONFIG_MODE) +contains( CONFIG_MODE, debug ) { + CONFIG += debug +} else { + CONFIG += release +} + diff --git a/src/OBJECT/OBJECT.pro b/src/OBJECT/OBJECT.pro index 7b8f30f2a..8839a194f 100644 --- a/src/OBJECT/OBJECT.pro +++ b/src/OBJECT/OBJECT.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -17,9 +19,6 @@ LIBS += $${CAS_LDPATH} win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += $(CASDEFINES) OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS diff --git a/src/ObjBrowser/ObjBrowser.pro b/src/ObjBrowser/ObjBrowser.pro index ff7dd2bd0..7dca05c4d 100644 --- a/src/ObjBrowser/ObjBrowser.pro +++ b/src/ObjBrowser/ObjBrowser.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -12,9 +14,6 @@ LIBS += -L../../$(CONFIG_ID)/lib -lQtx win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += OB_EXPORTS diff --git a/src/Plot2d/Plot2d.pro b/src/Plot2d/Plot2d.pro index 976b8d7c1..531f76994 100644 --- a/src/Plot2d/Plot2d.pro +++ b/src/Plot2d/Plot2d.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -15,9 +17,6 @@ LIBS += -L../../$(CONFIG_ID)/lib -lQtx -lSUIT win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 QWT_DLL DEFINES += PLOT2D_EXPORTS diff --git a/src/Prs/Prs.pro b/src/Prs/Prs.pro index b4fe7e1fc..6a7777b9c 100644 --- a/src/Prs/Prs.pro +++ b/src/Prs/Prs.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -10,9 +12,6 @@ OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += PRS_EXPORTS diff --git a/src/PyConsole/PyConsole.pro b/src/PyConsole/PyConsole.pro index 04e08a5e9..d77cffe00 100644 --- a/src/PyConsole/PyConsole.pro +++ b/src/PyConsole/PyConsole.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -9,13 +11,17 @@ OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET INCLUDEPATH += ../../include $$(PYTHONINC) unix:LIBS += -L../../$(CONFIG_ID)/lib -L$$(PYTHONLIB) -lpython2.5 -lSUIT -lPyInterp -win32:LIBS += -L../../$(CONFIG_ID)/lib -L$$(PYTHONLIB) -lpython25_d -lSUIT -lPyInterp -lQtx +win32:LIBS += -L../../$(CONFIG_ID)/lib -L$$(PYTHONLIB) -lSUIT -lPyInterp -lQtx +win32:CONFIG_MODE= $$(CONFIG_MODE) +contains( CONFIG_MODE, debug ) { + win32:LIBS += -lpython25_d +} else { + win32:LIBS += -lpython25 +} + win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 HAVE_DEBUG_PYTHON DEFINES += PYCONSOLE_EXPORTS diff --git a/src/PyInterp/PyInterp.pro b/src/PyInterp/PyInterp.pro index 3d651f075..ba5bce50a 100644 --- a/src/PyInterp/PyInterp.pro +++ b/src/PyInterp/PyInterp.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -9,13 +11,16 @@ OBJECTS_DIR = ../../$(CONFIG_ID)/obj/$$TARGET INCLUDEPATH += ../../include $$(PYTHONINC) unix:LIBS += -L$$(PYTHONLIB) -lpython2.5 -L../../$(CONFIG_ID)/lib -lEvent -win32:LIBS += -L$$(PYTHONLIB) -lpython25_d +win32:LIBS += -L$$(PYTHONLIB) +win32:CONFIG_MODE= $$(CONFIG_MODE) +contains( CONFIG_MODE, debug ) { + win32:LIBS += -lpython25_d +} else { + win32:LIBS += -lpython25 +} win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 HAVE_DEBUG_PYTHON DEFINES += PYINTERP_EXPORTS diff --git a/src/Qtx/Qtx.pro b/src/Qtx/Qtx.pro index f0dcfcb17..723aa23db 100644 --- a/src/Qtx/Qtx.pro +++ b/src/Qtx/Qtx.pro @@ -1,6 +1,8 @@ win32:TEMPLATE = vclib unix:TEMPLATE = lib +include(../Common.pro) + CONFIG += embed_manifest_exe win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe @@ -13,8 +15,6 @@ win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml QT += xml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared win32:DEFINES += WNT WIN32 DEFINES += QTX_EXPORTS diff --git a/src/STD/STD.pro b/src/STD/STD.pro index 06b048327..4ea94846e 100644 --- a/src/STD/STD.pro +++ b/src/STD/STD.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -12,9 +14,6 @@ LIBS += -L../../$(CONFIG_ID)/lib -lSUIT -lQtx win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += STD_EXPORTS diff --git a/src/SUIT/SUIT.pro b/src/SUIT/SUIT.pro index 3218615ca..a7ef27129 100644 --- a/src/SUIT/SUIT.pro +++ b/src/SUIT/SUIT.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -12,9 +14,6 @@ LIBS += -L../../$(CONFIG_ID)/lib -lQtx -lObjBrowser win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += SUIT_EXPORTS DISABLE_TESTRECORDER diff --git a/src/SUITApp/SUITApp.pro b/src/SUITApp/SUITApp.pro index def2d4011..09a412c22 100644 --- a/src/SUITApp/SUITApp.pro +++ b/src/SUITApp/SUITApp.pro @@ -1,6 +1,7 @@ unix:TEMPLATE = app win32:TEMPLATE = vcapp +include(../Common.pro) CONFIG -= embed_manifest_exe win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe @@ -14,9 +15,6 @@ LIBS += -L../../$(CONFIG_ID)/lib -lSUIT -lQtx -lStyle -lObjBrowser win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += DISABLE_TESTRECORDER diff --git a/src/SVTK/SVTK.pro b/src/SVTK/SVTK.pro index e60fc4939..cd20f3ef0 100644 --- a/src/SVTK/SVTK.pro +++ b/src/SVTK/SVTK.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -21,9 +23,6 @@ win32: LIBS += -lTKernel win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += SVTK_EXPORTS $(CASDEFINES) OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS diff --git a/src/Style/Style.pro b/src/Style/Style.pro index 6464ee83e..328b0453b 100644 --- a/src/Style/Style.pro +++ b/src/Style/Style.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -12,9 +14,6 @@ LIBS += -L../../$(CONFIG_ID)/lib -lQtx win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += STYLE_SALOME_EXPORTS diff --git a/src/TableViewer/TableViewer.pro b/src/TableViewer/TableViewer.pro index 8c0d63320..d60e9d65e 100644 --- a/src/TableViewer/TableViewer.pro +++ b/src/TableViewer/TableViewer.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -15,9 +17,6 @@ LIBS += -L../../$(CONFIG_ID)/lib -lQtx -lSUIT $${CAS_KERNEL} -lHTMLService win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += TABLEVIEWER_EXPORTS $(CASDEFINES) OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS diff --git a/src/VTKViewer/VTKViewer.pro b/src/VTKViewer/VTKViewer.pro index 1a8b2bab8..b9f4d2468 100644 --- a/src/VTKViewer/VTKViewer.pro +++ b/src/VTKViewer/VTKViewer.pro @@ -1,6 +1,8 @@ unix:TEMPLATE = lib win32:TEMPLATE = vclib +include(../Common.pro) + win32:QMAKE_MOC=$(QTDIR)\bin\moc.exe DESTDIR = ../../$(CONFIG_ID)/lib @@ -19,9 +21,6 @@ LIBS += -L../../$(CONFIG_ID)/lib -lQtx -lSUIT $${VTK_LIBS} $${CAS_KERNEL} win32:LIBS *= -L$(QTLIB) win32:INCLUDEPATH *= $(QTINC) $(QTINC)\QtCore $(QTINC)\QtGui $(QTINC)\QtXml -CONFIG -= debug release debug_and_release -CONFIG += qt thread debug dll shared - win32:DEFINES += WNT WIN32 DEFINES += VTKVIEWER_EXPORTS $(CASDEFINES) OCC_VERSION_MAJOR=6 OCC_VERSION_MINOR=1 OCC_VERSION_MAINTENANCE=1 LIN LINTEL CSFDB No_exception HAVE_CONFIG_H HAVE_LIMITS_H HAVE_WOK_CONFIG_H OCC_CONVERT_SIGNALS -- 2.39.2