[Kst] CFITSIO Problem

Nicholas Chapman nchapman at u.northwestern.edu
Wed Aug 7 14:12:33 UTC 2013


Sorry if I am being dense, but this doesn't make sense to me.  In
[root]/cmake/src/datasources/CMakeLists.txt, the fitsimage plugin has
the test: if(fitsimage) .... endif()

Yet "fitsimage" isn't defined anywhere.  I even checked in
[root]/cmake/modules as suggested by
src/datasources/HOWTO_add_a_datasource.txt, but "fitsimage" doesn't
appear anywhere in those files, so I don't see how this evaluates to
true.

I guess my original naive theory was that kst would check for
directories in [root]/src/datasources with the appropriate names such
as fitsimage, healpix, etc, then if such a directory exists, the if()
statement would be evaluated.  I can use the solution you suggest
"if(kst_sharp)" for now, but I would like to know the correct way to
do it.

Nicholas

On 8/6/13, Peter Kümmel <syntheticpp at gmx.net> wrote:
> 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)
>> 	kst_link(${SHARP_LIBRARIES} ${CFITSIO_LIBRARIES})
>> 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
>
> if(kst_sharp)
> endif()
>
>
> Peter
>
>
> _______________________________________________
> Kst mailing list
> Kst at kde.org
> https://mail.kde.org/mailman/listinfo/kst
>


More information about the Kst mailing list