[Kst] CFITSIO Problem

Peter Kümmel syntheticpp at gmx.net
Tue Aug 6 15:21:01 UTC 2013

On 06.08.2013 17:04, Nicholas Chapman wrote:
> Hi Peter.  Thanks for all your help.  I have solved my immediate
> problem with getting the code to compile.  As usual the solution is
> obvious in hindsight.  Below is my solution, though perhaps someone
> can enlighten me on the better solution.
> To activate my plugin, I edited
> [root]/cmake/src/datasources/CMakeLists.txt by adding the following:
> if(sharp) # NLC - Added to support raw sharp data
> 	include_directories(${SHARP_INCLUDE_DIR} ${CFITSIO_INCLUDE_DIR})
> 	kst_add_plugin(. sharp)
> endif()
> Eventually I realized that the if statement wasn't testing to true, so
> I added the following before the if:
> kst_add_plugin(. sharp)
> Which of course, caused all the linker error problems.  I initially
> thought that this was how one activated the if() statement.  I just
> now tried removing the if statement and leaving the three lines inside
> the if().  The code now compiles.  So, my question is, how can I set
> the if statement to evaluate to true?
> Thanks for all the help,
> Nicholas

You should test if the library cfitsio is available,
and only then build your sharp plugin like it is
done for the fitsimage plugin.

Or you manually control the plugin by passing an additional
parameter when calling cmake:

cmake -Dkst_sharp=1



More information about the Kst mailing list