[Kst] branches/work/kst/portto4/kst

Mike Fenton mike at staikos.net
Mon Jul 20 18:25:13 CEST 2009


SVN commit 999942 by fenton:

Update build system to support INSTALL_PREFIX INSTALL_LIBDIR
and only set QMAKE_RPATH when in debug mode.


 M  +7 -6      INSTALL  
 M  +2 -3      dataobjectplugin.pri  
 M  +2 -3      datasourceplugin.pri  
 M  +18 -1     kst.pri  
 M  +2 -3      src/kst/kst.pro  
 M  +9 -1      src/libkst/datasource.cpp  
 M  +2 -3      src/libkst/libkst.pro  
 M  +2 -3      src/libkstapp/libkstapp.pro  
 M  +9 -0      src/libkstmath/dataobject.cpp  
 M  +2 -3      src/libkstmath/libkstmath.pro  
 M  +3 -3      src/widgets/widgets.pro  


--- branches/work/kst/portto4/kst/INSTALL #999941:999942
@@ -1,8 +1,8 @@
-Installation Notes for Kst 2.0 Beta
+Installation Notes for Kst 2.0.0
 
 Linux
 
-1. Download or otherwise install Qt 4.4/4.5.
+1. Download or otherwise install Qt 4.5 or greater.
 2. Make sure your QTDIR is set to that Qt installation.
 3. Optionally update your ./config.pri has the appropriate settings for your machine.
 4. ./build-kst
@@ -13,9 +13,10 @@
 ie.  ./build-kst debug
 To configure the output directory, set OUTPUT_DIR or include it after the command line argument for debug.
 ie.  ./build-kst release /home/kst
-To enable make install support, set INSTDIR
 
+To enable make install support, set INSTALL_PREFIX and INSTALL_LIBDIR to control the location.  Defaults to /usr and lib.
 
+
 Mac OS
 
 Notes:
@@ -29,7 +30,7 @@
 
 Note:  This process must be done using the windows shell directly.  It cannot be done within cygwin or msys and neither can be included in the path.
 
-1. Download or otherwise install Qt 4.4/4.5.
+1. Download or otherwise install Qt 4.5 or greater.
 2. Update environment variables for build.
   a. This can be done using the Qt command line as installed in the Qt Creator bundle.
   b. This can be done using qtvars.bat generated by Qt and included below.
@@ -82,7 +83,7 @@
 Note:  This has only been build using Visual Studio & Cygwin.  The following steps
 are used on the current Windows build machine used for testing, but may vary.
 
-1. Download or otherwise install Qt 4.4/4.5.
+1. Download or otherwise install Qt 4.5 or greater.
 2. Make sure your QTDIR is set to that Qt installation.
 3. Make sure your ./config.pri has the appropriate settings for you machine.
 4. Start up Cygwin's bash shell - Required due to command line length limit in cmd.exe.
@@ -132,4 +133,4 @@
 call "C:\cygwin\Cygwin.bat" -i
 :ENDBASH
 
--------------------------------------------------------------
\ No newline at end of file
+-------------------------------------------------------------
--- branches/work/kst/portto4/kst/dataobjectplugin.pri #999941:999942
@@ -6,9 +6,8 @@
 MOC_DIR = tmp
 DESTDIR = $$OUTPUT_DIR/plugin
 
-INSTALL_DIR = $$(INSTDIR)
-! isEmpty(INSTALL_DIR) {
-  target.path = $$INSTALL_DIR/plugin
+! isEmpty(INSTALL_PREFIX) {
+  target.path = $$INSTALL_PREFIX/$$INSTALL_LIBDIR/kst
   INSTALLS += target
 }
 
--- branches/work/kst/portto4/kst/datasourceplugin.pri #999941:999942
@@ -7,9 +7,8 @@
 DESTDIR = $$OUTPUT_DIR/plugin
 CONFIG += debug
 
-INSTALL_DIR = $$(INSTDIR)
-! isEmpty(INSTALL_DIR) {
-  target.path = $$INSTALL_DIR/plugin
+! isEmpty(INSTALL_PREFIX) {
+  target.path = $$INSTALL_PREFIX/$$INSTALL_LIBDIR/kst
   INSTALLS += target
 }
 
--- branches/work/kst/portto4/kst/kst.pri #999941:999942
@@ -1,6 +1,22 @@
 OUTPUT_DIR = $$(OUTPUT_DIR)
 isEmpty(OUTPUT_DIR):OUTPUT_DIR=$$PWD/build
 
+INSTALL_PREFIX = $$(INSTALL_PREFIX)
+unix {
+  !mac {
+    isEmpty(INSTALL_PREFIX):INSTALL_PREFIX=/usr
+} }
+
+INSTALL_LIBDIR = $$(INSTALL_LIBDIR)
+unix {
+  !mac {
+    isEmpty(INSTALL_LIBDIR):INSTALL_LIBDIR=lib
+} }
+
+INSTALL_PREFIX=$$(DESTDIR)$$INSTALL_PREFIX
+
+DEFINES += INSTALL_LIBDIR=\\\"$$INSTALL_LIBDIR\\\"
+
 QT += core xml
 
 CONFIG += silent
@@ -8,6 +24,7 @@
 DEBUG_MODE = $$(KST_DEBUG_MODE)
 contains(DEBUG_MODE, 1) {
   CONFIG += debug
+  QMAKE_RPATHDIR += $$OUTPUT_DIR/lib $$OUTPUT_DIR/plugin
 }
 
 OBJECTS_DIR = tmp
@@ -20,4 +37,4 @@
 LIBS += -L$$OUTPUT_DIR/lib -L$$OUTPUT_DIR/plugin
 VERSION = 2.0.0
 
-QMAKE_RPATHDIR += $$OUTPUT_DIR/lib $$OUTPUT_DIR/plugin
+
--- branches/work/kst/portto4/kst/src/kst/kst.pro #999941:999942
@@ -4,9 +4,8 @@
 TARGET = kst
 DESTDIR = $$OUTPUT_DIR/bin
 
-INSTALL_DIR = $$(INSTDIR)
-! isEmpty(INSTALL_DIR) {
-  target.path = $$INSTALL_DIR/bin
+! isEmpty(INSTALL_PREFIX) {
+  target.path = $$INSTALL_PREFIX/bin
   INSTALLS += target
 }
 
--- branches/work/kst/portto4/kst/src/libkst/datasource.cpp #999941:999942
@@ -125,6 +125,15 @@
   pluginPaths << QLibraryInfo::location(QLibraryInfo::PluginsPath);
   pluginPaths << QString(qApp->applicationDirPath()).replace("bin", "plugin");
 
+  QDir rootDir = QApplication::applicationDirPath();
+  rootDir.cdUp();
+  QString pluginPath = rootDir.canonicalPath();
+  pluginPath += QDir::separator();
+  pluginPath += QLatin1String(INSTALL_LIBDIR);
+  pluginPath += QDir::separator();
+  pluginPath += QLatin1String("kst");
+  pluginPaths << pluginPath;
+
   foreach (QString pluginPath, pluginPaths) {
     QDir d(pluginPath);
     foreach (QString fileName, d.entryList(QDir::Files)) {
@@ -146,7 +155,6 @@
   _pluginList = tmpList;
 }
 
-
 void DataSource::initPlugins() {
   if (_pluginList.isEmpty()) {
       scanPlugins();
--- branches/work/kst/portto4/kst/src/libkst/libkst.pro #999941:999942
@@ -5,9 +5,8 @@
 DESTDIR = $$OUTPUT_DIR/lib
 win32:CONFIG += staticlib
 
-INSTALL_DIR = $$(INSTDIR)
-! isEmpty(INSTALL_DIR) {
-  target.path = $$INSTALL_DIR/lib
+! isEmpty(INSTALL_PREFIX) {
+  target.path = $$INSTALL_PREFIX/$$INSTALL_LIBDIR
   INSTALLS += target
 }
 
--- branches/work/kst/portto4/kst/src/libkstapp/libkstapp.pro #999941:999942
@@ -7,9 +7,8 @@
 DESTDIR = $$OUTPUT_DIR/lib
 win32:CONFIG += staticlib
 
-INSTALL_DIR = $$(INSTDIR)
-! isEmpty(INSTALL_DIR) {
-  target.path = $$INSTALL_DIR/lib
+! isEmpty(INSTALL_PREFIX) {
+  target.path = $$INSTALL_PREFIX/$$INSTALL_LIBDIR
   INSTALLS += target
 }
 
--- branches/work/kst/portto4/kst/src/libkstmath/dataobject.cpp #999941:999942
@@ -96,6 +96,15 @@
   pluginPaths << QLibraryInfo::location(QLibraryInfo::PluginsPath);
   pluginPaths << QString(qApp->applicationDirPath()).replace("bin", "plugin");
 
+  QDir rootDir = QApplication::applicationDirPath();
+  rootDir.cdUp();
+  QString pluginPath = rootDir.canonicalPath();
+  pluginPath += QDir::separator();
+  pluginPath += QLatin1String(INSTALL_LIBDIR);
+  pluginPath += QDir::separator();
+  pluginPath += QLatin1String("kst");
+  pluginPaths << pluginPath;
+
   foreach (QString pluginPath, pluginPaths) {
     QDir d(pluginPath);
     foreach (QString fileName, d.entryList(QDir::Files)) {
--- branches/work/kst/portto4/kst/src/libkstmath/libkstmath.pro #999941:999942
@@ -5,9 +5,8 @@
 DESTDIR = $$OUTPUT_DIR/lib
 win32:CONFIG += staticlib
 
-INSTALL_DIR = $$(INSTDIR)
-! isEmpty(INSTALL_DIR) {
-  target.path = $$INSTALL_DIR/lib
+! isEmpty(INSTALL_PREFIX) {
+  target.path = $$INSTALL_PREFIX/$$INSTALL_LIBDIR
   INSTALLS += target
 }
 
--- branches/work/kst/portto4/kst/src/widgets/widgets.pro #999941:999942
@@ -7,12 +7,12 @@
 TARGET = kstwidgets
 win32:CONFIG += staticlib
 
-INSTALL_DIR = $$(INSTDIR)
-! isEmpty(INSTALL_DIR) {
-  target.path = $$INSTALL_DIR/plugin
+! isEmpty(INSTALL_PREFIX) {
+  target.path = $$INSTALL_PREFIX/$$INSTALL_LIBDIR/kst
   INSTALLS += target
 }
 
+
 DESTDIR = $$OUTPUT_DIR/plugin
 
 INCLUDEPATH += \


More information about the Kst mailing list