From 6b9a037e4510600c35277ce6a7d1d23593b3024d Mon Sep 17 00:00:00 2001 From: Faruk D Date: Wed, 29 Aug 2018 17:04:44 +0200 Subject: [PATCH] fix cfitsio variables --- CMakeLists.txt | 6 +++--- CMakeModules/FindCfitsIO.cmake | 26 +++++++++++++------------- src/MPI/CMakeLists.txt | 2 +- src/MS/CMakeLists.txt | 2 +- src/buildsky/CMakeLists.txt | 2 +- src/restore/CMakeLists.txt | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index aedcefa..791179a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,7 +73,7 @@ include_directories(${CASACORE_INCLUDE_DIR}) #cfitsio find_package(CfitsIO REQUIRED) -include_directories(${CFITSIO_INCLUDE_DIR}) +include_directories(${CFITSIO_INCLUDE}) #lapack find_package(LAPACK REQUIRED) @@ -158,8 +158,8 @@ message (STATUS "LAPACK_LIBRARIES........... = ${LAPACK_LIBRARIES}") #message (STATUS "GFORTRAN-INC ......... = ${GFORTRAN_INCLUDE_DIR}") #message (STATUS "GFORTRAN-LIBS ......... = ${LIBGFORTRAN_LIBRARIES}") -message (STATUS "CFITSIO_INCLUDE_DIR.......... = ${CFITSIO_INCLUDE_DIR}") -message (STATUS "CFITSIO_LIBRARIES.......... = ${CFITSIO_LIBRARIES}") +message (STATUS "CFITSIO_INCLUDE.......... = ${CFITSIO_INCLUDE}") +message (STATUS "CFITSIO_LIB.......... = ${CFITSIO_LIB}") message (STATUS "WCSLIB_INCLUDE_DIR........... = ${WCSLIB_INCLUDE_DIR}") message (STATUS "WCSLIB_LIBRARIES ........... = ${WCSLIB_LIBRARIES}") diff --git a/CMakeModules/FindCfitsIO.cmake b/CMakeModules/FindCfitsIO.cmake index a749701..62baf9c 100644 --- a/CMakeModules/FindCfitsIO.cmake +++ b/CMakeModules/FindCfitsIO.cmake @@ -3,11 +3,11 @@ # CFITSIO_ROOT_DIR - CFITSIO root directory # Variables defined by this module: # CFITSIO_FOUND - system has CFITSIO -# CFITSIO_INCLUDE_DIR - the CFITSIO include directory (cached) -# CFITSIO_INCLUDE_DIRS - the CFITSIO include directories -# (identical to CFITSIO_INCLUDE_DIR) +# CFITSIO_INCLUDE - the CFITSIO include directory (cached) +# CFITSIO_INCLUDES - the CFITSIO include directories +# (identical to CFITSIO_INCLUDE) # CFITSIO_LIBRARY - the CFITSIO library (cached) -# CFITSIO_LIBRARIES - the CFITSIO libraries +# CFITSIO_LIB - the CFITSIO libraries # (identical to CFITSIO_LIBRARY) # CFITSIO_VERSION_STRING the found version of CFITSIO, padded to 3 digits @@ -33,12 +33,12 @@ if(NOT CFITSIO_FOUND) - find_path(CFITSIO_INCLUDE_DIR fitsio.h + find_path(CFITSIO_INCLUDE fitsio.h HINTS ${CFITSIO_ROOT_DIR} PATH_SUFFIXES include include/cfitsio include/libcfitsio0) - if(CFITSIO_INCLUDE_DIR) - FILE(READ "${CFITSIO_INCLUDE_DIR}/fitsio.h" CFITSIO_H) + if(CFITSIO_INCLUDE) + FILE(READ "${CFITSIO_INCLUDE}/fitsio.h" CFITSIO_H) set(CFITSIO_VERSION_REGEX ".*#define CFITSIO_VERSION[^0-9]*([0-9]+)\\.([0-9]+).*") if ("${CFITSIO_H}" MATCHES ${CFITSIO_VERSION_REGEX}) # Pad CFITSIO minor version to three digit because 3.181 is older than 3.35 @@ -51,24 +51,24 @@ if(NOT CFITSIO_FOUND) else () set(CFITSIO_VERSION_STRING "Unknown") endif() - endif(CFITSIO_INCLUDE_DIR) + endif(CFITSIO_INCLUDE) find_library(CFITSIO_LIBRARY cfitsio HINTS ${CFITSIO_ROOT_DIR} PATH_SUFFIXES lib) find_library(M_LIBRARY m) - mark_as_advanced(CFITSIO_INCLUDE_DIR CFITSIO_LIBRARY M_LIBRARY) + mark_as_advanced(CFITSIO_INCLUDE CFITSIO_LIBRARY M_LIBRARY) if(CMAKE_VERSION VERSION_LESS "2.8.3") find_package_handle_standard_args(CFITSIO DEFAULT_MSG - CFITSIO_LIBRARY M_LIBRARY CFITSIO_INCLUDE_DIR) + CFITSIO_LIBRARY M_LIBRARY CFITSIO_INCLUDE) else () include(FindPackageHandleStandardArgs) find_package_handle_standard_args(CFITSIO - REQUIRED_VARS CFITSIO_LIBRARY M_LIBRARY CFITSIO_INCLUDE_DIR + REQUIRED_VARS CFITSIO_LIBRARY M_LIBRARY CFITSIO_INCLUDE VERSION_VAR CFITSIO_VERSION_STRING) endif () - set(CFITSIO_INCLUDE_DIRS ${CFITSIO_INCLUDE_DIR}) - set(CFITSIO_LIBRARIES ${CFITSIO_LIBRARY} ${M_LIBRARY}) + set(CFITSIO_INCLUDES ${CFITSIO_INCLUDE}) + set(CFITSIO_LIB ${CFITSIO_LIBRARY} ${M_LIBRARY}) endif(NOT CFITSIO_FOUND) diff --git a/src/MPI/CMakeLists.txt b/src/MPI/CMakeLists.txt index 27b6fae..c2e98dd 100644 --- a/src/MPI/CMakeLists.txt +++ b/src/MPI/CMakeLists.txt @@ -18,7 +18,7 @@ add_executable(sagecal-mpi ${SRCFILES}) target_link_libraries(sagecal-mpi ${CASACORE_LIBRARIES} - ${CFITSIO_LIBRARIES} + ${CFITSIO_LIB} ${OpenBLAS_LIB} ${LAPACK_LIBRARIES} ${WCSLIB_LIBRARIES} diff --git a/src/MS/CMakeLists.txt b/src/MS/CMakeLists.txt index e7e79d6..5319b7d 100644 --- a/src/MS/CMakeLists.txt +++ b/src/MS/CMakeLists.txt @@ -23,7 +23,7 @@ add_executable(sagecal ${SRCFILES}) target_link_libraries(sagecal ${CASACORE_LIBRARIES} - ${CFITSIO_LIBRARIES} + ${CFITSIO_LIB} ${OpenBLAS_LIB} ${LAPACK_LIBRARIES} ${WCSLIB_LIBRARIES} diff --git a/src/buildsky/CMakeLists.txt b/src/buildsky/CMakeLists.txt index 47ceb0f..634f623 100644 --- a/src/buildsky/CMakeLists.txt +++ b/src/buildsky/CMakeLists.txt @@ -8,7 +8,7 @@ FILE(GLOB SRCFILES *.c) add_executable(buildsky ${SRCFILES}) target_link_libraries(buildsky - ${CFITSIO_LIBRARIES} + ${CFITSIO_LIB} ${OpenBLAS_LIB} ${LAPACK_LIBRARIES} ${WCSLIB_LIBRARIES} diff --git a/src/restore/CMakeLists.txt b/src/restore/CMakeLists.txt index 85f5c95..f0971b3 100644 --- a/src/restore/CMakeLists.txt +++ b/src/restore/CMakeLists.txt @@ -9,7 +9,7 @@ FILE(GLOB SRCFILES *.c) add_executable(restore ${SRCFILES}) target_link_libraries(restore - ${CFITSIO_LIBRARIES} + ${CFITSIO_LIB} ${OpenBLAS_LIB} ${LAPACK_LIBRARIES} ${WCSLIB_LIBRARIES}