From 1c1141d43e42bdecec596092a28614130f5137c1 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Tue, 23 Feb 2016 18:12:16 +0000 Subject: [PATCH] Added missing install for cmake-based builds, netcdf_mem.h. Also, moved install directives for header files into include/CMakeLists.txt. This is in support of https://github.com/Unidata/netcdf-c/issues/227 --- CMakeLists.txt | 19 +------------------ include/CMakeLists.txt | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2639cfb897..23522c7606 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -974,7 +974,7 @@ IF(ENABLE_PNETCDF) MESSAGE(STATUS "Using PNetCDF Library: ${PNETCDF}") ELSE() MESSAGE(WARNING "ENABLE_PNETCDF requires version 1.6.1 or later; found version ${pnetcdf_version}. PNetCDF is disabled") - ENDIF() + ENDIF() ENDIF(NOT PNETCDF) ENDIF() @@ -1549,23 +1549,6 @@ ENDIF() ##### ADD_SUBDIRECTORY(docs) -##### -# Moving on to CPack, install packages. -##### -INSTALL(FILES ${netCDF_SOURCE_DIR}/include/netcdf.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT headers) - -INSTALL(FILES ${netCDF_BINARY_DIR}/include/netcdf_meta.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT headers) - -IF(ENABLE_PNETCDF OR ENABLE_PARALLEL) - INSTALL(FILES ${netCDF_SOURCE_DIR}/include/netcdf_par.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} - COMPONENT headers) -ENDIF() - ## # Brute force, grab all of the dlls from the depency directory, # install them in the binary dir. Grab all of the .libs, put them diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index 1e1592204a..60eabd18cc 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -1,3 +1,26 @@ +##### +# Installation of various netCDF headers. +##### + +INSTALL(FILES ${netCDF_SOURCE_DIR}/include/netcdf.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT headers) + +INSTALL(FILES ${netCDF_SOURCE_DIR}/include/netcdf_mem.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT headers) + +INSTALL(FILES ${netCDF_BINARY_DIR}/include/netcdf_meta.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT headers) + +IF(ENABLE_PNETCDF OR ENABLE_PARALLEL) + INSTALL(FILES ${netCDF_SOURCE_DIR}/include/netcdf_par.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + COMPONENT headers) +ENDIF() + + FILE(GLOB CUR_EXTRA_DIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/*.h) SET(CUR_EXTRA_DIST ${CUR_EXTRA_DIST} Makefile.am CMakeLists.txt) ADD_EXTRA_DIST("${CUR_EXTRA_DIST}")