diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2010-08-20 15:16:06 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2010-08-20 15:16:06 (GMT) |
commit | 456ebba0fbeff3951764acab396ba161297e99ef (patch) | |
tree | ddcc9fc08770d657dd15b84cd90fcf6a2e4a7a3a /src | |
parent | 7c31e7873c4e91fdb25b921d0220e9961ef0af7f (diff) | |
download | hdf5-456ebba0fbeff3951764acab396ba161297e99ef.zip hdf5-456ebba0fbeff3951764acab396ba161297e99ef.tar.gz hdf5-456ebba0fbeff3951764acab396ba161297e99ef.tar.bz2 |
[svn-r19257] Change Cmake to allow a local zlib header to be used in H5Zdelate module.
Corrected use of "SKIP" message in cmake.
Corrections to cmake configuration files (for cmake external projects).
Community suggested changes.
Tested: local linux
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 31 | ||||
-rw-r--r-- | src/H5Zdeflate.c | 7 |
2 files changed, 24 insertions, 14 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c64d4f0..bcec81c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -417,6 +417,11 @@ SET (H5Z_SRCS ${HDF5_SRC_DIR}/H5Zszip.c ${HDF5_SRC_DIR}/H5Ztrans.c ) +IF (H5_ZLIB_HEADER) + SET_PROPERTY(SOURCE ${HDF5_SRC_DIR}/H5Zdeflate.c PROPERTY + COMPILE_DEFINITIONS H5_ZLIB_HEADER="${H5_ZLIB_HEADER}") +ENDIF (H5_ZLIB_HEADER) + SET (H5Z_HDRS ${HDF5_SRC_DIR}/H5Zpkg.h @@ -642,15 +647,17 @@ H5_SET_LIB_OPTIONS (${HDF5_LIB_TARGET} ${HDF5_LIB_NAME} ${LIB_TYPE}) #----------------------------------------------------------------------------- # Add file(s) to CMake Install #----------------------------------------------------------------------------- -INSTALL (
- FILES
- ${H5_PUBLIC_HEADERS}
- ${H5_PRIVATE_HEADERS}
- DESTINATION
- include
- COMPONENT - headers -)
+IF (NOT HDF5_INSTALL_NO_DEVELOPMENT) + INSTALL ( + FILES + ${H5_PUBLIC_HEADERS} + ${H5_PRIVATE_HEADERS} + DESTINATION + ${HDF5_INSTALL_INCLUDE_DIR} + COMPONENT + headers + ) +ENDIF () #----------------------------------------------------------------------------- # Add Target(s) to CMake Install for import into other projects @@ -661,8 +668,8 @@ IF (HDF5_EXPORTED_TARGETS) ${HDF5_LIB_TARGET} EXPORT ${HDF5_EXPORTED_TARGETS} - LIBRARY DESTINATION lib COMPONENT libraries - ARCHIVE DESTINATION lib COMPONENT libraries - RUNTIME DESTINATION bin COMPONENT libraries + LIBRARY DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries + ARCHIVE DESTINATION ${HDF5_INSTALL_LIB_DIR} COMPONENT libraries + RUNTIME DESTINATION ${HDF5_INSTALL_BIN_DIR} COMPONENT libraries ) ENDIF (HDF5_EXPORTED_TARGETS) diff --git a/src/H5Zdeflate.c b/src/H5Zdeflate.c index c490720..63e7b9a 100644 --- a/src/H5Zdeflate.c +++ b/src/H5Zdeflate.c @@ -28,8 +28,11 @@ #ifdef H5_HAVE_FILTER_DEFLATE -#ifdef H5_HAVE_ZLIB_H -# include "zlib.h" +#if defined(H5_HAVE_ZLIB_H) && !defined(H5_ZLIB_HEADER) +# define H5_ZLIB_HEADER "zlib.h" +#endif +#if defined(H5_ZLIB_HEADER) +# include H5_ZLIB_HEADER /* "zlib.h" */ #endif /* Local function prototypes */ |