From a558736861b97d6158c76c385e519aa4b194b4a7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 10 Aug 2010 09:55:55 -0500 Subject: [svn-r19212] Updated cmake file with community suggested changes for cmake install files. Removed configure check for fseek Tested: local linux --- CMakeLists.txt | 51 ++++++++++++------------------- MANIFEST | 4 +-- config/cmake/ConfigureChecks.cmake | 1 - config/cmake/H5pubconf.h.in | 3 -- config/cmake/HDF5-config.cmake.build.in | 42 ------------------------- config/cmake/HDF5-config.cmake.install.in | 43 -------------------------- config/cmake/hdf5-config.cmake.build.in | 42 +++++++++++++++++++++++++ config/cmake/hdf5-config.cmake.install.in | 43 ++++++++++++++++++++++++++ 8 files changed, 107 insertions(+), 122 deletions(-) delete mode 100644 config/cmake/HDF5-config.cmake.build.in delete mode 100644 config/cmake/HDF5-config.cmake.install.in create mode 100644 config/cmake/hdf5-config.cmake.build.in create mode 100644 config/cmake/hdf5-config.cmake.install.in diff --git a/CMakeLists.txt b/CMakeLists.txt index ccd6ccd..b4514a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,38 +41,27 @@ PROJECT (HDF5 C CXX) # SET(HDF5_EXTERNALLY_CONFIGURED 1) # # Avoid duplicating names of installed libraries # SET(HDF5_EXTERNAL_LIB_PREFIX "vtk") -# # Targets linking to the HDF5 libs need to know their names -# # if they are changed in the sub project, they should be here too -# SET(HDF5_LIB_NAME "vtkhdf5") -# SET(HDF5_HL_LIB_NAME "vtkhdf5_hl") -# SET(HDF5_LIBRARY "${HDF5_LIB_NAME};${HDF5_HL_LIB_NAME}") # # Export configuration to this export variable # SET(HDF5_EXPORTED_TARGETS "paraview-targets") # # # Setup all necessary overrides for zlib so that HDF5 uses our # # internally compiled zlib rather than any other version # IF(HDF5_ENABLE_Z_LIB_SUPPORT) -# # We must tell the main HDF5 library that it depends on our zlib +# # We must tell the main HDF5 library that it depends on our zlib # SET(HDF5_LIB_DEPENDENCIES vtkzlib) # # Override the zlib header file # IF(VTK_USE_SYSTEM_ZLIB) # SET(H5_ZLIB_HEADER "zlib.h") # ELSE(VTK_USE_SYSTEM_ZLIB) -# SET(H5_ZLIB_HEADER "vtk_zlib.h") +# SET(H5_ZLIB_HEADER "vtk_zlib.h") # # Set vars that FindZlib would have set if used in sub project # SET(ZLIB_INCLUDE_DIRS "${VTK_ZLIB_INCLUDE_DIRS}") # SET(ZLIB_LIBRARIES vtkzlib) # ENDIF(VTK_USE_SYSTEM_ZLIB) -# ENDIF(HDF5_ENABLE_Z_LIB_SUPPORT) -# +# ENDIF(HDF5_ENABLE_Z_LIB_SUPPORT) +# # # Add the sub project # ADD_SUBDIRECTORY(Utilities/hdf5-1.8) -# # Add the HDF5 dirs to our include path -# SET(HDF5_INCLUDE_DIR -# ${ParaView_SOURCE_DIR}/Utilities/hdf5-1.8/src -# ${ParaView_BINARY_DIR}/Utilities/hdf5-1.8 -# ${ParaView_SOURCE_DIR}/Utilities/hdf5-1.8/hl/src) -# #----------------------------------------------------------------------------- #----------------------------------------------------------------------------- @@ -600,9 +589,9 @@ INSTALL ( EXPORT ${HDF5_EXPORTED_TARGETS} DESTINATION - lib + lib/cmake/hdf5-${HDF5_PACKAGE_VERSION} FILE - HDF5-targets.cmake + hdf5-targets.cmake ) #----------------------------------------------------------------------------- @@ -612,11 +601,10 @@ EXPORT ( TARGETS ${HDF5_LIBRARIES_TO_EXPORT} ${HDF5_LIB_DEPENDENCIES} FILE - HDF5-targets.cmake + hdf5-targets.cmake ) - #----------------------------------------------------------------------------- -# Configure the HDF5-config.cmake file for the build directory +# Configure the hdf5-config.cmake file for the build directory #----------------------------------------------------------------------------- SET (HDF5_INCLUDES_BUILD_TIME ${HDF5_SRC_DIR} ${HDF5_CPP_SOURCE_DIR} ${HDF5_HL_SOURCE_DIR} @@ -627,21 +615,22 @@ SET (HDF5_VERSION_MAJOR @HDF5_PACKAGE_VERSION_MAJOR@) SET (HDF5_VERSION_MINOR @HDF5_PACKAGE_VERSION_MINOR@) CONFIGURE_FILE ( - ${HDF5_RESOURCES_DIR}/HDF5-config.cmake.build.in - ${HDF5_BINARY_DIR}/HDF5-config.cmake @ONLY + ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.build.in + ${HDF5_BINARY_DIR}/hdf5-config.cmake @ONLY ) #----------------------------------------------------------------------------- -# Configure the HDF5-config.cmake file for the install directory +# Configure the hdf5-config.cmake file for the install directory #----------------------------------------------------------------------------- -INSTALL (CODE - "SET (HDF5_INSTALL_SKIP_TARGETS 1) - INCLUDE (${HDF5_BINARY_DIR}/HDF5-config.cmake) - CONFIGURE_FILE ( - \"${HDF5_RESOURCES_DIR}/HDF5-config.cmake.install.in\" - \"${CMAKE_INSTALL_PREFIX}/lib/HDF5-config.cmake\" @ONLY - ) - " +CONFIGURE_FILE ( + ${HDF5_RESOURCES_DIR}/hdf5-config.cmake.install.in + ${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config.cmake @ONLY +) +INSTALL ( + FILES + ${HDF5_BINARY_DIR}/CMakeFiles/hdf5-config.cmake + DESTINATION + lib/cmake/hdf5-${HDF5_PACKAGE_VERSION} ) #----------------------------------------------------------------------------- diff --git a/MANIFEST b/MANIFEST index 9933d7b..39ea8de 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1867,8 +1867,8 @@ ./config/cmake/H5pubconf.h.in ./config/cmake/hdf5_zlib.h.in ./config/cmake/FindHDF5.cmake -./config/cmake/HDF5-config.cmake.build.in -./config/cmake/HDF5-config.cmake.install.in +./config/cmake/hdf5-config.cmake.build.in +./config/cmake/hdf5-config.cmake.install.in ./config/cmake/HDF5Macros.cmake ./config/cmake/libhdf5.settings.cmake.in ./config/cmake/cacheinit.cmake diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 0a447d5..c58eb3a 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -525,7 +525,6 @@ ENDIF (WINDOWS) #----------------------------------------------------------------------------- IF (HAVE_OFF64_T) CHECK_FUNCTION_EXISTS (lseek64 H5_HAVE_LSEEK64) - CHECK_FUNCTION_EXISTS (fseek64 H5_HAVE_FSEEK64) ENDIF (HAVE_OFF64_T) #----------------------------------------------------------------------------- diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index e159523..fdcf6b2 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -142,9 +142,6 @@ /* Define to 1 if you have the `frexpl' function. */ #cmakedefine H5_HAVE_FREXPL @H5_HAVE_FREXPL@ -/* Define to 1 if you have the `fseek64' function. */ -#cmakedefine H5_HAVE_FSEEK64 @H5_HAVE_FSEEK64@ - /* Define to 1 if you have the `fseeko' function. */ #cmakedefine H5_HAVE_FSEEKO @H5_HAVE_FSEEKO@ diff --git a/config/cmake/HDF5-config.cmake.build.in b/config/cmake/HDF5-config.cmake.build.in deleted file mode 100644 index 132e8be..0000000 --- a/config/cmake/HDF5-config.cmake.build.in +++ /dev/null @@ -1,42 +0,0 @@ -#----------------------------------------------------------------------------- -# HDF5 Config file for compiling against hdf5 build directory -#----------------------------------------------------------------------------- - -SET (HDF5_INCLUDE_DIRS "@HDF5_INCLUDES_BUILD_TIME@") - -#----------------------------------------------------------------------------- -# Don't include targets if this file is being picked up by another -# project which has already build hdf5 as a subproject -#----------------------------------------------------------------------------- -IF (NOT TARGET "hdf5" AND NOT HDF5_INSTALL_SKIP_TARGETS) - GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) - INCLUDE (${SELF_DIR}/HDF5-targets.cmake) -ENDIF (NOT TARGET "hdf5" AND NOT HDF5_INSTALL_SKIP_TARGETS) - -SET (HDF5_VERSION_STRING @HDF5_VERSION_STRING@) -SET (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@) -SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@) - -SET (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@) -SET (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@) -SET (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@) -SET (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@) -SET (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@) - -# -# To be continued ... -# -# XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry. -# XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry. -# XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include -# XXX_EXECUTABLE Where to find the XXX tool. -# XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX. -# XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry. -# XXX_ROOT_DIR Where to find the base directory of XXX. -# XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true. -# XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command. -# XXX_YY_FOUND If False, optional YY part of XXX sytem is not available. -# XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX. -# XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries. -# The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix. -# This should not be a cache entry. diff --git a/config/cmake/HDF5-config.cmake.install.in b/config/cmake/HDF5-config.cmake.install.in deleted file mode 100644 index 2c33edf..0000000 --- a/config/cmake/HDF5-config.cmake.install.in +++ /dev/null @@ -1,43 +0,0 @@ -#----------------------------------------------------------------------------- -# HDF5 Config file for compiling against hdf5 install directory -#----------------------------------------------------------------------------- - -GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) -GET_FILENAME_COMPONENT (HDF5_INCLUDE_DIRS "${SELF_DIR}/../include" ABSOLUTE) -SET (HDF5_FORTRAN_DIR ${HDF5_INCLUDE_DIRS}/fortran) - -#----------------------------------------------------------------------------- -# Don't include targets if this file is being picked up by another -# project which has already build hdf5 as a subproject -#----------------------------------------------------------------------------- -IF (NOT TARGET "hdf5") - INCLUDE (${SELF_DIR}/HDF5-targets.cmake) -ENDIF (NOT TARGET "hdf5") - -SET (HDF5_VERSION_STRING @HDF5_VERSION_STRING@) -SET (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@) -SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@) - -SET (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@) -SET (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@) -SET (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@) -SET (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@) -SET (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@) - -# -# To be continued ... -# -# XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry. -# XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry. -# XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include -# XXX_EXECUTABLE Where to find the XXX tool. -# XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX. -# XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry. -# XXX_ROOT_DIR Where to find the base directory of XXX. -# XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true. -# XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command. -# XXX_YY_FOUND If False, optional YY part of XXX sytem is not available. -# XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX. -# XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries. -# The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix. -# This should not be a cache entry. diff --git a/config/cmake/hdf5-config.cmake.build.in b/config/cmake/hdf5-config.cmake.build.in new file mode 100644 index 0000000..132e8be --- /dev/null +++ b/config/cmake/hdf5-config.cmake.build.in @@ -0,0 +1,42 @@ +#----------------------------------------------------------------------------- +# HDF5 Config file for compiling against hdf5 build directory +#----------------------------------------------------------------------------- + +SET (HDF5_INCLUDE_DIRS "@HDF5_INCLUDES_BUILD_TIME@") + +#----------------------------------------------------------------------------- +# Don't include targets if this file is being picked up by another +# project which has already build hdf5 as a subproject +#----------------------------------------------------------------------------- +IF (NOT TARGET "hdf5" AND NOT HDF5_INSTALL_SKIP_TARGETS) + GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) + INCLUDE (${SELF_DIR}/HDF5-targets.cmake) +ENDIF (NOT TARGET "hdf5" AND NOT HDF5_INSTALL_SKIP_TARGETS) + +SET (HDF5_VERSION_STRING @HDF5_VERSION_STRING@) +SET (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@) +SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@) + +SET (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@) +SET (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@) +SET (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@) +SET (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@) +SET (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@) + +# +# To be continued ... +# +# XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry. +# XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry. +# XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include +# XXX_EXECUTABLE Where to find the XXX tool. +# XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX. +# XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry. +# XXX_ROOT_DIR Where to find the base directory of XXX. +# XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true. +# XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command. +# XXX_YY_FOUND If False, optional YY part of XXX sytem is not available. +# XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX. +# XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries. +# The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix. +# This should not be a cache entry. diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.install.in new file mode 100644 index 0000000..2c33edf --- /dev/null +++ b/config/cmake/hdf5-config.cmake.install.in @@ -0,0 +1,43 @@ +#----------------------------------------------------------------------------- +# HDF5 Config file for compiling against hdf5 install directory +#----------------------------------------------------------------------------- + +GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +GET_FILENAME_COMPONENT (HDF5_INCLUDE_DIRS "${SELF_DIR}/../include" ABSOLUTE) +SET (HDF5_FORTRAN_DIR ${HDF5_INCLUDE_DIRS}/fortran) + +#----------------------------------------------------------------------------- +# Don't include targets if this file is being picked up by another +# project which has already build hdf5 as a subproject +#----------------------------------------------------------------------------- +IF (NOT TARGET "hdf5") + INCLUDE (${SELF_DIR}/HDF5-targets.cmake) +ENDIF (NOT TARGET "hdf5") + +SET (HDF5_VERSION_STRING @HDF5_VERSION_STRING@) +SET (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@) +SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@) + +SET (HDF5_ENABLE_PARALLEL @HDF5_ENABLE_PARALLEL@) +SET (HDF5_BUILD_FORTRAN @HDF5_BUILD_FORTRAN@) +SET (HDF5_BUILD_CPP_LIB @HDF5_BUILD_CPP_LIB@) +SET (HDF5_BUILD_TOOLS @HDF5_BUILD_TOOLS@) +SET (HDF5_BUILD_HL_LIB @HDF5_BUILD_HL_LIB@) + +# +# To be continued ... +# +# XXX_INCLUDE_DIRS The final set of include directories listed in one variable for use by client code. This should not be a cache entry. +# XXX_LIBRARIES The libraries to link against to use XXX. These should include full paths. This should not be a cache entry. +# XXX_DEFINITIONS Definitions to use when compiling code that uses XXX. This really shouldn't include options such as (-DHAS_JPEG)that a client source-code file uses to decide whether to #include +# XXX_EXECUTABLE Where to find the XXX tool. +# XXX_YYY_EXECUTABLE Where to find the YYY tool that comes with XXX. +# XXX_LIBRARY_DIRS Optionally, the final set of library directories listed in one variable for use by client code. This should not be a cache entry. +# XXX_ROOT_DIR Where to find the base directory of XXX. +# XXX_VERSION_YY Expect Version YY if true. Make sure at most one of these is ever true. +# XXX_WRAP_YY If False, do not try to use the relevent CMake wrapping command. +# XXX_YY_FOUND If False, optional YY part of XXX sytem is not available. +# XXX_FOUND Set to false, or undefined, if we haven't found, or don't want to use XXX. +# XXX_RUNTIME_LIBRARY_DIRS Optionally, the runtime library search path for use when running an executable linked to shared libraries. +# The list should be used by user code to create the PATH on windows or LD_LIBRARY_PATH on unix. +# This should not be a cache entry. -- cgit v0.12