Warning, /graphics/kst-plot/cmake/3rdparty/cfitsio/CMakeLists.txt is written in an unsupported language. File is not indexed.

0001 cmake_minimum_required(VERSION 2.6.4)
0002 
0003 project( cfit )
0004 
0005 
0006 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR}/bin) 
0007 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR}/lib) 
0008 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY  ${CMAKE_BINARY_DIR}/lib) 
0009 
0010 if(NOT CFIT_DIR)
0011         set(CFIT_DIR ${CMAKE_SOURCE_DIR})
0012 endif()
0013 
0014 set(cfit_sources
0015         ${CFIT_DIR}/buffers.c
0016         ${CFIT_DIR}/cfileio.c
0017         ${CFIT_DIR}/checksum.c
0018         ${CFIT_DIR}/compress.c
0019         ${CFIT_DIR}/drvrfile.c
0020         ${CFIT_DIR}/drvrmem.c
0021         ${CFIT_DIR}/editcol.c
0022         ${CFIT_DIR}/edithdu.c
0023         ${CFIT_DIR}/eval_f.c
0024         ${CFIT_DIR}/eval_l.c
0025         ${CFIT_DIR}/eval_y.c
0026         ${CFIT_DIR}/f77_wrap1.c
0027         ${CFIT_DIR}/f77_wrap2.c
0028         ${CFIT_DIR}/f77_wrap3.c
0029         ${CFIT_DIR}/f77_wrap4.c
0030         ${CFIT_DIR}/fitscore.c
0031         ${CFIT_DIR}/getcol.c
0032         ${CFIT_DIR}/getcolb.c
0033         ${CFIT_DIR}/getcold.c
0034         ${CFIT_DIR}/getcole.c
0035         ${CFIT_DIR}/getcoli.c
0036         ${CFIT_DIR}/getcolj.c
0037         ${CFIT_DIR}/getcolk.c
0038         ${CFIT_DIR}/getcoll.c
0039         ${CFIT_DIR}/getcols.c
0040         ${CFIT_DIR}/getcolsb.c
0041         ${CFIT_DIR}/getcolui.c
0042         ${CFIT_DIR}/getcoluj.c
0043         ${CFIT_DIR}/getcoluk.c
0044         ${CFIT_DIR}/getkey.c
0045         ${CFIT_DIR}/group.c
0046         ${CFIT_DIR}/grparser.c
0047         ${CFIT_DIR}/histo.c
0048         ${CFIT_DIR}/iraffits.c
0049         ${CFIT_DIR}/modkey.c
0050         ${CFIT_DIR}/putcol.c
0051         ${CFIT_DIR}/putcolb.c
0052         ${CFIT_DIR}/putcold.c
0053         ${CFIT_DIR}/putcole.c
0054         ${CFIT_DIR}/putcoli.c
0055         ${CFIT_DIR}/putcolj.c
0056         ${CFIT_DIR}/putcolk.c
0057         ${CFIT_DIR}/putcoll.c
0058         ${CFIT_DIR}/putcols.c
0059         ${CFIT_DIR}/putcolsb.c
0060         ${CFIT_DIR}/putcolu.c
0061         ${CFIT_DIR}/putcolui.c
0062         ${CFIT_DIR}/putcoluj.c
0063         ${CFIT_DIR}/putcoluk.c
0064         ${CFIT_DIR}/putkey.c
0065         ${CFIT_DIR}/region.c
0066         ${CFIT_DIR}/scalnull.c
0067         ${CFIT_DIR}/swapproc.c
0068         ${CFIT_DIR}/wcssub.c
0069         ${CFIT_DIR}/wcsutil.c
0070         ${CFIT_DIR}/fits_hcompress.c
0071         ${CFIT_DIR}/fits_hdecompress.c
0072         ${CFIT_DIR}/imcompress.c
0073         ${CFIT_DIR}/pliocomp.c
0074         ${CFIT_DIR}/quantize.c
0075         ${CFIT_DIR}/ricecomp.c
0076 )
0077 
0078 file(GLOB cfit_headers ${CFIT_DIR}/*.h)
0079 
0080 
0081 if(MSVC)
0082         add_definitions(-D_CRT_SECURE_NO_WARNINGS)
0083         set(CMAKE_DEBUG_POSTFIX d)
0084 endif()
0085 
0086 include_directories(
0087   ${CMAKE_SOURCE_DIR}
0088   ${CMAKE_CURRENT_BINARY_DIR}
0089 )
0090 
0091 add_library(cfitsio STATIC ${cfit_sources} ${cfit_headers})
0092 
0093 if (NOT CMAKE_INSTALL_PREFIX)
0094         set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_BINARY_DIR}/INSTALLED)
0095 endif()
0096 
0097 install(FILES ${cfit_headers} DESTINATION include/cfitsio)
0098 install(TARGETS cfitsio DESTINATION lib)
0099 
0100