Skip to content

Commit

Permalink
Added missing install for cmake-based builds, netcdf_mem.h. Also, mov…
Browse files Browse the repository at this point in the history
…ed install directives for header files into include/CMakeLists.txt. This is in support of #227
  • Loading branch information
WardF committed Feb 23, 2016
1 parent 81d28b8 commit 1c1141d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
19 changes: 1 addition & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down
23 changes: 23 additions & 0 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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}")

0 comments on commit 1c1141d

Please sign in to comment.