[Kst] branches/work/kst/portto4/kst
Peter Kümmel
syntheticpp at gmx.net
Sat Jan 8 13:20:19 CET 2011
SVN commit 1212877 by kuemmel:
add fitsimage support on windows, needs some debugging because it doesn't show anything when some BLAST file is selected
M +1 -0 cmake/CMakeLists.txt
M +36 -14 cmake/modules/FindCFITSIO.cmake
M +4 -0 cmake/modules/KstMacros.cmake
M +20 -12 cmake/src/datasources/CMakeLists.txt
A misc/cfitsio-windows (directory)
AM misc/cfitsio-windows/CMakeLists.txt
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1212876:1212877
@@ -40,6 +40,7 @@
find_package(Getdata)
find_package(Gsl)
find_package(Netcdf)
+find_package(CFITSIO)
message(STATUS "----------------------------------------------")
message(STATUS)
--- branches/work/kst/portto4/kst/cmake/modules/FindCFITSIO.cmake #1212876:1212877
@@ -1,17 +1,39 @@
-FIND_PATH(CFITSIO_INCLUDE_DIR fitsio.h /usr/include /usr/local/include)
-FIND_LIBRARY(CFITSIO_LIBRARY NAMES cfitsio PATH /usr/lib /usr/local/lib)
+include(FindPkgConfig)
-IF (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARY)
- SET(CFITSIO_FOUND TRUE)
-ENDIF (CFITSIO_INCLUDE_DIR AND CFITSIO_LIBRARY)
+pkg_check_modules(CFITSIO CFITSIO)
-IF (CFITSIO_FOUND)
- IF (NOT Cfitsio_FIND_QUIETLY)
- MESSAGE(STATUS "Found cfitsio: ${CFITSIO_LIBRARY}")
- ENDIF (NOT Cfitsio_FIND_QUIETLY)
-ELSE (CFITSIO_FOUND)
- IF (Cfitsio_FIND_REQUIRED)
- MESSAGE(FATAL_ERROR "Could not find cfitsio")
- ENDIF (Cfitsio_FIND_REQUIRED)
-ENDIF (CFITSIO_FOUND)
\ No newline at end of file
+if(CFITSIO_INCLUDEDIR AND CFITSIO_LIBRARIES)
+ set(CFITSIO_LIBRARY -L${CFITSIO_LIBRARY_DIRS} ${CFITSIO_LIBRARIES})
+else()
+ set(CFITSIO_INCLUDEDIR CFITSIO_INCLUDEDIR-NOTFOUND CACHE STRING "" FORCE)
+ FIND_PATH(CFITSIO_INCLUDEDIR fitsio.h
+ HINTS
+ ENV CFITSIO_DIR
+ PATH_SUFFIXES include/cfitsio include
+ PATHS
+ )
+ FIND_LIBRARY(CFITSIO_LIBRARIES cfitsio
+ HINTS
+ ENV CFITSIO_DIR
+ PATH_SUFFIXES lib
+ PATHS
+ )
+endif()
+
+message(STATUS "CFITSIO: ${CFITSIO_INCLUDEDIR}")
+message(STATUS "CFITSIO: ${CFITSIO_LIBRARIES}")
+IF(CFITSIO_INCLUDEDIR AND CFITSIO_LIBRARIES)
+ MESSAGE(STATUS "CFITSIO found at ${CFITSIO_INCLUDEDIR}")
+ SET(CFITSIO_INCLUDE_DIR ${CFITSIO_INCLUDEDIR} ${CFITSIO_INCLUDEDIR}/..)
+ if (UNIX)
+ SET(CFITSIO_LIBRARIES ${CFITSIO_LIBRARIES} m)
+ endif()
+ SET(CFITSIO 1)
+ SET(cfitsio 1)
+ELSE()
+ MESSAGE(STATUS "CFITSIO not found.")
+ENDIF()
+
+
+
--- branches/work/kst/portto4/kst/cmake/modules/KstMacros.cmake #1212876:1212877
@@ -91,6 +91,10 @@
add_library(${kst_name} MODULE ${kst_${kst_name}_sources} ${kst_${kst_name}_headers})
kst_link(kstcore kstmath kstwidgets)
install(TARGETS ${kst_name} LIBRARY DESTINATION plugin)
+ set(_msg ${ARGV2})
+ if(_msg)
+ message(STATUS "${ARGV2}${kst_name}")
+ endif()
endmacro()
--- branches/work/kst/portto4/kst/cmake/src/datasources/CMakeLists.txt #1212876:1212877
@@ -6,36 +6,44 @@
add_definitions(-DKST_USE_KST_ATOF)
endif()
-kst_add_plugin(. ascii)
-kst_add_plugin(. qimagesource)
-kst_add_plugin(. sampledatasource)
+set(msg "> ")
+message(STATUS "Building datasource plugins---------------------------------")
+kst_add_plugin(. ascii ${msg})
+kst_add_plugin(. qimagesource ${msg})
+kst_add_plugin(. sampledatasource ${msg})
if(getdata)
- message(STATUS "Building 'dirfile' datasource plugin")
include_directories(${GETDATA_INCLUDE_DIR})
- kst_add_plugin(. dirfilesource)
+ kst_add_plugin(. dirfilesource ${msg})
kst_link(${GETDATA_LIBRARIES})
endif()
-if(fitsimage)
- kst_add_plugin(. fitsimage)
+if(cfitsio)
+ include_directories(${CFITSIO_INCLUDE_DIR})
+ kst_add_plugin(. fitsimage ${msg})
+ kst_link(${CFITSIO_LIBRARIES})
endif()
if(healpix)
- kst_add_plugin(. healpix)
+ kst_add_plugin(. healpix ${msg})
endif()
if(lfioo)
- kst_add_plugin(. lfiio)
+ kst_add_plugin(. lfiio ${msg})
endif()
if(netcdf)
- message(STATUS "Building 'netcdf' datasource plugin")
include_directories(${NETCDF_INCLUDE_DIR})
- kst_add_plugin(. netcdf)
+ kst_add_plugin(. netcdf ${msg})
kst_link(${NETCDF_LIBRARIES})
endif()
if(planckIDEF)
- kst_add_plugin(. planckIDEF)
+ kst_add_plugin(. planckIDEF ${msg})
endif()
+
+
+message(STATUS "------------------------------------------------------------")
+message(STATUS)
+
+
More information about the Kst
mailing list