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

Peter Kümmel syntheticpp at gmx.net
Fri Aug 27 09:52:04 CEST 2010


SVN commit 1168635 by kuemmel:

move pkg-config code to .pri file which is included by the relevant .pro file

 M  +39 -2     datasourceplugin.pri  
 M  +0 -6      src/datasources/datasources.pro  
 M  +0 -9      src/datasources/dirfilesource/dirfilesource.pro  
 M  +0 -5      src/datasources/fitsimage/fitsimage.pro  
 M  +0 -9      src/datasources/netcdf/netcdf.pro  


--- branches/work/kst/portto4/kst/datasourceplugin.pri #1168634:1168635
@@ -1,3 +1,5 @@
+include(config.pri)
+
 QT += xml 
 
 TEMPLATE = lib
@@ -3,6 +5,8 @@
 CONFIG += plugin warn_on
 CONFIG -= precompile_header
-!win32:OBJECTS_DIR = tmp
-!win32:MOC_DIR = tmp
+!win32 {
+    OBJECTS_DIR = tmp
+    MOC_DIR = tmp
+}
 DESTDIR = $$OUTPUT_DIR/plugin
 
@@ -17,3 +21,36 @@
     $$TOPLEVELDIR/src/libkst 
 
 LIBS += -L$$OUTPUT_DIR/lib -l$$kstlib(kst2lib)
+
+
+LibExists(cfitsio) {
+    win32 {
+    
+    } else {   
+	CONFIG += link_pkgconfig
+	PKGCONFIG += cfitsio
+	INCLUDEPATH += $$pkginclude(cfitsio)
+    }
+}
+
+LibExists(getdata) {
+    win32{
+	INCLUDEPATH += $$(GETDATADIR)/include
+	LIBS += -L$$(GETDATADIR)/lib
+    } else {
+	CONFIG += link_pkgconfig
+	PKGCONFIG += getdata
+	INCLUDEPATH += $$pkginclude(getdata)
+    }
+}
+
+LibExists(netcdf) {
+    win32 {	
+	INCLUDEPATH += $$(NETCDFDIR)/include
+	LIBS += -L$$(NETCDFDIR)/lib
+    } else {
+	CONFIG += link_pkgconfig
+	PKGCONFIG += netcdf
+	INCLUDEPATH += $$pkginclude(netcdf)
+    }
+}
--- branches/work/kst/portto4/kst/src/datasources/datasources.pro #1168634:1168635
@@ -10,21 +10,15 @@
 LibExists(cfitsio) {
     message(CFITSIO configured.  Plugins will be built.)
     SUBDIRS += fitsimage 
-    !win32:CONFIG += link_pkgconfig
-    !win32:PKGCONFIG += cfitsio
 }
 
 LibExists(getdata) {
     message(DIRFILE configured.  Plugins will be built.)
     SUBDIRS += dirfilesource
-    !win32:CONFIG += link_pkgconfig
-    !win32:PKGCONFIG += getdata
 }
 
 LibExists(netcdf) {
     message(netCDF configured.  Plugins will be built.)
     SUBDIRS += netcdf
-    !win32:CONFIG += link_pkgconfig
-    !win32:PKGCONFIG += netcdf
 }
 
--- branches/work/kst/portto4/kst/src/datasources/dirfilesource/dirfilesource.pro #1168634:1168635
@@ -1,5 +1,4 @@
 TOPOUT_REL=../../..
-include($$PWD/$$TOPOUT_REL/config.pri)
 include($$PWD/$$TOPOUT_REL/kst.pri)
 include($$PWD/../../../datasourceplugin.pri)
 
@@ -7,14 +6,6 @@
 
 INCLUDEPATH += $$OUTPUT_DIR/src/datasources/dirfilesource/tmp
 
-win32{
-	message(Using GetData C++ binding files from $$(GETDATADIR).)
-	INCLUDEPATH += $$(GETDATADIR)/include
-	LIBS += -L$$(GETDATADIR)/lib
-} else {
-	INCLUDEPATH += $$pkginclude(getdata)
-}
-
 LIBS += -lgetdata++
 win32:LIBS += -lgetdata
 
--- branches/work/kst/portto4/kst/src/datasources/fitsimage/fitsimage.pro #1168634:1168635
@@ -8,12 +8,7 @@
 
 LIBS += -lcfitsio
 
-win32 {
     
-} else {
-    INCLUDEPATH += $$pkginclude(cfitsio)
-}
-
 SOURCES += \
     fitsimage.cpp
 
--- branches/work/kst/portto4/kst/src/datasources/netcdf/netcdf.pro #1168634:1168635
@@ -1,5 +1,4 @@
 TOPOUT_REL=../../..
-include($$PWD/$$TOPOUT_REL/config.pri)
 include($$PWD/$$TOPOUT_REL/kst.pri)
 include($$PWD/../../../datasourceplugin.pri)
 
@@ -7,14 +6,6 @@
 
 INCLUDEPATH += $$OUTPUT_DIR/src/datasources/netcdf/tmp
 
-win32 {
-	message(Using netCDF files from $$(NETCDFDIR).)
-	INCLUDEPATH += $$(NETCDFDIR)/include
-	LIBS += -L$$(NETCDFDIR)/lib
-} else {
-	INCLUDEPATH += $$pkginclude(netcdf)
-}
-
 LIBS += -l$$kstlib(netcdf_c++) -l$$kstlib(netcdf) 
 
 SOURCES += \


More information about the Kst mailing list