[Kst] branches/work/kst/portto4/kst
Peter Kümmel
syntheticpp at gmx.net
Sun Dec 5 15:08:35 CET 2010
SVN commit 1203875 by kuemmel:
cmake: add gsl, netcdf, and getdata plugins
M +3 -0 cmake/CMakeLists.txt
AM cmake/modules/FindGetdata.cmake
AM cmake/modules/FindGsl.cmake
AM cmake/modules/FindNetcdf.cmake
M +25 -1 cmake/modules/KstMacros.cmake
M +6 -0 cmake/src/datasources/CMakeLists.txt
M +40 -35 cmake/src/plugins/CMakeLists.txt
M +1 -0 src/libkstapp/datamanager.h
M +2 -0 src/libkstapp/defaultlabelpropertiestab.cpp
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1203874:1203875
@@ -6,6 +6,9 @@
include(KstMacros)
find_package(Qt4 REQUIRED)
+find_package(Getdata)
+find_package(Gsl)
+find_package(Netcdf)
set(KST_VERSION 2.0.3)
--- branches/work/kst/portto4/kst/cmake/modules/KstMacros.cmake #1203874:1203875
@@ -59,7 +59,7 @@
endmacro()
-macro(kst_link type)
+macro(kst_link)
target_link_libraries(${kst_name} ${ARGV})
endmacro()
@@ -80,4 +80,28 @@
set(kst_${kst_name}_sources ${kst_${kst_name}_sources} ${_rcc})
endmacro()
+
+macro(kst_option _name _description _default _sys)
+ set(_msg OFF)
+ if(${_sys} MATCHES "gcc")
+ set(_system CMAKE_COMPILER_IS_GNUCXX)
+ else()
+ set(_system ${_sys})
+ endif()
+ if(${_system} MATCHES "all")
+ option(KST_${_name} ${_description} ${_default})
+ set(_msg ON)
+ else()
+ if(${${_system}})
+ option(KST_${_name} ${_description} ${_default})
+ set(_msg ON)
+ endif()
+ endif()
+ if(_msg)
+ string(SUBSTRING "kst_${_name} " 0 25 _var)
+ string(SUBSTRING "${kst_${_name}} " 0 4 _val)
+ message(STATUS "${_var}: ${_val} (${_description})")
+ endif()
+endmacro()
+
\ No newline at end of file
--- branches/work/kst/portto4/kst/cmake/src/datasources/CMakeLists.txt #1203874:1203875
@@ -7,7 +7,10 @@
kst_add_plugin(. sampledatasource)
if(getdata)
+ message(STATUS "Building 'dirfile' datasource plugin")
+ include_directories(${GETDATA_INCLUDE_DIR})
kst_add_plugin(. dirfilesource)
+ kst_link(${GETDATA_LIBRARIES})
endif()
if(fitsimage)
@@ -23,7 +26,10 @@
endif()
if(netcdf)
+ message(STATUS "Building 'netcdf' datasource plugin")
+ include_directories(${NETCDF_INCLUDE_DIR})
kst_add_plugin(. netcdf)
+ kst_link(${NETCDF_LIBRARIES})
endif()
if(planckIDEF)
--- branches/work/kst/portto4/kst/cmake/src/plugins/CMakeLists.txt #1203874:1203875
@@ -15,47 +15,52 @@
kst_add_plugin(dataobject differentiation)
kst_add_plugin(dataobject effectivebandwidth)
kst_add_plugin(dataobject genericfilter)
-if(gsl)
- kst_add_plugin(dataobject/convolution convolve)
- kst_add_plugin(dataobject/convolution deconvolve)
- kst_add_plugin(dataobject/correlation autocorrelation)
- kst_add_plugin(dataobject/correlation crosscorrelation)
- kst_add_plugin(dataobject/interpolations akima)
- kst_add_plugin(dataobject/interpolations akimaperiodic)
- kst_add_plugin(dataobject/interpolations cspline)
- kst_add_plugin(dataobject/interpolations csplineperiodic)
- kst_add_plugin(dataobject/interpolations linear)
- kst_add_plugin(dataobject/interpolations polynomial)
- kst_add_plugin(dataobject noiseaddition)
- kst_add_plugin(dataobject periodogram)
-endif()
kst_add_plugin(filters cumulativesum)
kst_add_plugin(filters despike)
kst_add_plugin(filters differentiation)
+
if(gsl)
- kst_add_plugin(filters butterworth_bandpass)
- kst_add_plugin(filters butterworth_bandstop)
- kst_add_plugin(filters butterworth_highpass)
- kst_add_plugin(filters butterworth_lowpass)
-endif()
-if(gsl)
- kst_add_plugin(fits exponential_unweighted)
- kst_add_plugin(fits exponential_weighted)
- kst_add_plugin(fits gaussian_unweighted)
- kst_add_plugin(fits gaussian_weighted)
- kst_add_plugin(fits gradient_unweighted)
- kst_add_plugin(fits gradient_weighted)
- kst_add_plugin(fits kneefrequency)
- kst_add_plugin(fits linear_unweighted)
- kst_add_plugin(fits linear_weighted)
- kst_add_plugin(fits lorentzian_unweighted)
- kst_add_plugin(fits lorentzian_weighted)
- kst_add_plugin(fits polynomial_unweighted)
- kst_add_plugin(fits polynomial_weighted)
- kst_add_plugin(fits sinusoid_unweighted)
- kst_add_plugin(fits sinusoid_weighted)
+ include_directories(${GSL_INCLUDE_DIR})
+ macro(kst_add_gsl_plugin dir name)
+ kst_add_plugin(${dir} ${name})
+ kst_link(${GSL_LIBRARY})
+ endmacro()
+
+ kst_add_gsl_plugin(dataobject/convolution convolve)
+ kst_add_gsl_plugin(dataobject/convolution deconvolve)
+ kst_add_gsl_plugin(dataobject/correlation autocorrelation)
+ kst_add_gsl_plugin(dataobject/correlation crosscorrelation)
+ kst_add_gsl_plugin(dataobject/interpolations akima)
+ kst_add_gsl_plugin(dataobject/interpolations akimaperiodic)
+ kst_add_gsl_plugin(dataobject/interpolations cspline)
+ kst_add_gsl_plugin(dataobject/interpolations csplineperiodic)
+ kst_add_gsl_plugin(dataobject/interpolations linear)
+ kst_add_gsl_plugin(dataobject/interpolations polynomial)
+ kst_add_gsl_plugin(dataobject noiseaddition)
+ kst_add_gsl_plugin(dataobject periodogram)
+
+ kst_add_gsl_plugin(filters butterworth_bandpass)
+ kst_add_gsl_plugin(filters butterworth_bandstop)
+ kst_add_gsl_plugin(filters butterworth_highpass)
+ kst_add_gsl_plugin(filters butterworth_lowpass)
+
+ kst_add_gsl_plugin(fits exponential_unweighted)
+ kst_add_gsl_plugin(fits exponential_weighted)
+ kst_add_gsl_plugin(fits gaussian_unweighted)
+ kst_add_gsl_plugin(fits gaussian_weighted)
+ kst_add_gsl_plugin(fits gradient_unweighted)
+ kst_add_gsl_plugin(fits gradient_weighted)
+ kst_add_gsl_plugin(fits kneefrequency)
+ kst_add_gsl_plugin(fits linear_unweighted)
+ kst_add_gsl_plugin(fits linear_weighted)
+ kst_add_gsl_plugin(fits lorentzian_unweighted)
+ kst_add_gsl_plugin(fits lorentzian_weighted)
+ kst_add_gsl_plugin(fits polynomial_unweighted)
+ kst_add_gsl_plugin(fits polynomial_weighted)
+ kst_add_gsl_plugin(fits sinusoid_unweighted)
+ kst_add_gsl_plugin(fits sinusoid_weighted)
endif()
--- branches/work/kst/portto4/kst/src/libkstapp/datamanager.h #1203874:1203875
@@ -14,6 +14,7 @@
#define DATAMANAGER_H
#include <QDialog>
+#include <QShortcut>
#include "object.h"
#include "ui_datamanager.h"
--- branches/work/kst/portto4/kst/src/libkstapp/defaultlabelpropertiestab.cpp #1203874:1203875
@@ -12,6 +12,8 @@
#include "kst_i18n.h"
#include "defaultlabelpropertiestab.h"
+#include <math.h>
+
namespace Kst {
const double USLetterWidth = (11.0 - 1.0)*2.54; // 11 inches with a 1/2" margin in cm
More information about the Kst
mailing list