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}")