summaryrefslogtreecommitdiffstats
path: root/config/cmake
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-07-25 22:17:48 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-07-25 22:17:48 (GMT)
commitdd27fe612cf9c80d223939a46a96202eaf81f60d (patch)
tree0deae7b9c4824be7e84aa7e232a529a9ae125c60 /config/cmake
parentc04144fb39b6d7a489c37e89ac8a0240991026a6 (diff)
downloadhdf5-dd27fe612cf9c80d223939a46a96202eaf81f60d.zip
hdf5-dd27fe612cf9c80d223939a46a96202eaf81f60d.tar.gz
hdf5-dd27fe612cf9c80d223939a46a96202eaf81f60d.tar.bz2
[svn-r22602]
Diffstat (limited to 'config/cmake')
-rw-r--r--config/cmake/FindHDF5.cmake85
-rw-r--r--config/cmake/FindHDF5.cmake.in4
-rw-r--r--config/cmake/H5pubconf.h.in18
-rw-r--r--config/cmake/HDFLibMacros.cmake6
-rwxr-xr-xconfig/cmake/cacheinit.cmake6
-rw-r--r--config/cmake/hdf5-config.cmake.build.in12
-rw-r--r--config/cmake/hdf5-config.cmake.install.in10
-rw-r--r--config/cmake/libhdf5.settings.cmake.in2
8 files changed, 29 insertions, 114 deletions
diff --git a/config/cmake/FindHDF5.cmake b/config/cmake/FindHDF5.cmake
deleted file mode 100644
index 33532b0..0000000
--- a/config/cmake/FindHDF5.cmake
+++ /dev/null
@@ -1,85 +0,0 @@
-#
-# To be used by projects that make use of Cmakeified hdf5-1.8
-#
-
-#
-# Find the HDF5 includes and get all installed hdf5 library settings from
-# HDF5-config.cmake file : Requires a CMake compatible hdf5-1.8.5 or later
-# for this feature to work. The following vars are set if hdf5 is found.
-#
-# HDF5_FOUND - True if found, otherwise all other vars are undefined
-# HDF5_INCLUDE_DIR - The include dir for main *.h files
-# HDF5_FORTRAN_INCLUDE_DIR - The include dir for fortran modules and headers
-# HDF5_VERSION_STRING - full version (e.g. 1.8.5)
-# HDF5_VERSION_MAJOR - major part of version (e.g. 1.8)
-# HDF5_VERSION_MINOR - minor part (e.g. 5)
-#
-# The following boolean vars will be defined
-# HDF5_ENABLE_PARALLEL - 1 if HDF5 parallel supported
-# HDF5_BUILD_FORTRAN - 1 if HDF5 was compiled with fortran on
-# HDF5_BUILD_CPP_LIB - 1 if HDF5 was compiled with cpp on
-# HDF5_BUILD_TOOLS - 1 if HDF5 was compiled with tools on
-# HDF5_BUILD_HL_LIB - 1 if HDF5 was compiled with high level on
-# HDF5_BUILD_HL_CPP_LIB - 1 if HDF5 was compiled with high level and cpp on
-#
-# Target names that are valid (depending on enabled options)
-# will be the following
-#
-# hdf5 : HDF5 C library
-# hdf5_tools : the tools library
-# hdf5_f90cstub : used by Fortran to C interface
-# hdf5_fortran : Fortran HDF5 library
-# hdf5_cpp : HDF5 cpp interface library
-# hdf5_hl : High Level library
-# hdf5_hl_f90cstub : used by Fortran to C interface to High Level library
-# hdf5_hl_fortran : Fortran High Level library
-# hdf5_hl_cpp : High Level cpp interface library
-#
-# To aid in finding HDF5 as part of a subproject set
-# HDF5_ROOT_DIR_HINT to the location where hdf5-config.cmake lies
-
-INCLUDE (SelectLibraryConfigurations)
-INCLUDE (FindPackageHandleStandardArgs)
-
-# The HINTS option should only be used for values computed from the system.
-SET (_HDF5_HINTS
- $ENV{HOME}/.local
- $ENV{HDF5_ROOT}
- $ENV{HDF5_ROOT_DIR_HINT}
-)
-# Hard-coded guesses should still go in PATHS. This ensures that the user
-# environment can always override hard guesses.
-SET (_HDF5_PATHS
- $ENV{HOME}/.local
- $ENV{HDF5_ROOT}
- $ENV{HDF5_ROOT_DIR_HINT}
- /usr/lib/hdf5
- /usr/share/hdf5
- /usr/local/hdf5
- /usr/local/hdf5/share
-)
-
-FIND_PATH (HDF5_ROOT_DIR "hdf5-config.cmake"
- HINTS ${_HDF5_HINTS}
- PATHS ${_HDF5_PATHS}
- PATH_SUFFIXES
- lib/cmake/hdf5
- share/cmake/hdf5
-)
-
-FIND_PATH (HDF5_INCLUDE_DIRS "H5public.h"
- HINTS ${_HDF5_HINTS}
- PATHS ${_HDF5_PATHS}
- PATH_SUFFIXES
- include
- Include
-)
-
-# For backwards compatibility we set HDF5_INCLUDE_DIR to the value of
-# HDF5_INCLUDE_DIRS
-SET ( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
-
-IF (HDF5_INCLUDE_DIR)
- SET (HDF5_FOUND "YES")
- INCLUDE (${HDF5_ROOT_DIR}/hdf5-config.cmake)
-ENDIF (HDF5_INCLUDE_DIR)
diff --git a/config/cmake/FindHDF5.cmake.in b/config/cmake/FindHDF5.cmake.in
index a866859..7be4de3 100644
--- a/config/cmake/FindHDF5.cmake.in
+++ b/config/cmake/FindHDF5.cmake.in
@@ -59,7 +59,7 @@ SET (_HDF5_PATHS
/usr/local/@HDF5_PACKAGE@/share
)
-FIND_PATH (HDF5_ROOT_DIR "@HDF5_PACKAGE@@HDF5_PACKAGE_EXT@-config.cmake"
+FIND_PATH (HDF5_ROOT_DIR "@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake"
HINTS ${_HDF5_HINTS}
PATHS ${_HDF5_PATHS}
PATH_SUFFIXES
@@ -81,5 +81,5 @@ SET ( HDF5_INCLUDE_DIR "${HDF5_INCLUDE_DIRS}" )
IF (HDF5_INCLUDE_DIR)
SET (HDF5_FOUND "YES")
- INCLUDE (${HDF5_ROOT_DIR}/@HDF5_PACKAGE@@HDF5_PACKAGE_EXT@-config.cmake)
+ INCLUDE (${HDF5_ROOT_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-config.cmake)
ENDIF (HDF5_INCLUDE_DIR)
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 6fca1ae..71e8c10 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -15,24 +15,6 @@
/* Define if using a Windows compiler (i.e. Visual Studio) */
#cmakedefine H5_HAVE_VISUAL_STUDIO @H5_HAVE_VISUAL_STUDIO@
-/* Defined if HDF5 was built with CMake AND build as a shared library */
-#cmakedefine H5_BUILT_AS_DYNAMIC_LIB @H5_BUILT_AS_DYNAMIC_LIB@
-
-/* Defined if HDF5 was built with CMake AND build as a static library */
-#cmakedefine H5_BUILT_AS_STATIC_LIB @H5_BUILT_AS_STATIC_LIB@
-
-/* Defined if HDF5 CPP was built with CMake AND build as a shared library */
-#cmakedefine H5_CPP_BUILT_AS_DYNAMIC_LIB @H5_CPP_BUILT_AS_DYNAMIC_LIB@
-
-/* Defined if HDF5 CPP was built with CMake AND build as a static library */
-#cmakedefine H5_CPP_BUILT_AS_STATIC_LIB @H5_CPP_BUILT_AS_STATIC_LIB@
-
-/* Defined if HDF5 HL was built with CMake AND build as a shared library */
-#cmakedefine H5_HL_BUILT_AS_DYNAMIC_LIB @H5_HL_BUILT_AS_DYNAMIC_LIB@
-
-/* Defined if HDF5 HL was built with CMake AND build as a static library */
-#cmakedefine H5_HL_BUILT_AS_STATIC_LIB @H5_HL_BUILT_AS_STATIC_LIB@
-
/* Define if building universal (internal helper macro) */
#cmakedefine H5_AC_APPLE_UNIVERSAL_BUILD @H5_AC_APPLE_UNIVERSAL_BUILD@
diff --git a/config/cmake/HDFLibMacros.cmake b/config/cmake/HDFLibMacros.cmake
index 7b54c95..57e6be7 100644
--- a/config/cmake/HDFLibMacros.cmake
+++ b/config/cmake/HDFLibMacros.cmake
@@ -10,6 +10,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic)
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
@@ -25,6 +26,7 @@ MACRO (EXTERNAL_JPEG_LIBRARY compress_type libtype jpeg_pic)
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DJPEG_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
@@ -122,6 +124,7 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
@@ -138,6 +141,7 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DSZIP_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
@@ -236,6 +240,7 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype)
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
@@ -251,6 +256,7 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype)
INSTALL_COMMAND ""
CMAKE_ARGS
-DBUILD_SHARED_LIBS:BOOL=${BUILD_SHARED_LIBS}
+ -DHDF_PACKAGE_EXT:STRING=${HDF_PACKAGE_EXT}
-DZLIB_EXTERNALLY_CONFIGURED:BOOL=OFF
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake
index e7dd19f..d45ef9e 100755
--- a/config/cmake/cacheinit.cmake
+++ b/config/cmake/cacheinit.cmake
@@ -8,6 +8,8 @@ SET (BUILD_SHARED_LIBS ON CACHE BOOL "Build Shared Libraries" FORCE)
SET (BUILD_TESTING ON CACHE BOOL "Build HDF5 Unit Testing" FORCE)
+SET (HDF_PACKAGE_EXT "" CACHE STRING "Name of HDF package extension" FORCE)
+
SET (HDF5_BUILD_CPP_LIB ON CACHE BOOL "Build HDF5 C++ Library" FORCE)
SET (HDF5_BUILD_EXAMPLES ON CACHE BOOL "Build HDF5 Library Examples" FORCE)
@@ -69,3 +71,7 @@ SET (SZIP_SVN_URL "http://svn.hdfgroup.uiuc.edu/szip/trunk" CACHE STRING "Use SZ
SET (ZLIB_TGZ_NAME "ZLib.tar.gz" CACHE STRING "Use ZLib from compressed file" FORCE)
SET (SZIP_TGZ_NAME "SZip.tar.gz" CACHE STRING "Use SZip from compressed file" FORCE)
+
+SET (ZLIB_PACKAGE_NAME "zlib" CACHE STRING "Name of ZLIB package" FORCE)
+
+SET (SZIP_PACKAGE_NAME "szip" CACHE STRING "Name of SZIP package" FORCE)
diff --git a/config/cmake/hdf5-config.cmake.build.in b/config/cmake/hdf5-config.cmake.build.in
index ccf5e67..881985e 100644
--- a/config/cmake/hdf5-config.cmake.build.in
+++ b/config/cmake/hdf5-config.cmake.build.in
@@ -42,6 +42,12 @@ IF (HDF5_BUILD_TOOLS)
SET (HDF5_INCLUDE_DIR_TOOLS ${HDF5_INCLUDE_DIR} )
ENDIF (HDF5_BUILD_TOOLS)
+IF (HDF5_BUILD_SHARED_LIBS)
+ SET (H5_BUILT_AS_DYNAMIC_LIB 1 )
+ELSE (HDF5_BUILD_SHARED_LIBS)
+ SET (H5_BUILT_AS_STATIC_LIB 1 )
+ENDIF (HDF5_BUILD_SHARED_LIBS)
+
#-----------------------------------------------------------------------------
# Version Strings
#-----------------------------------------------------------------------------
@@ -53,7 +59,7 @@ SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
# 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)
+IF (NOT TARGET "@HDF5_PACKAGE@")
+ INCLUDE (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
SET (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
-ENDIF (NOT TARGET "hdf5")
+ENDIF (NOT TARGET "@HDF5_PACKAGE@")
diff --git a/config/cmake/hdf5-config.cmake.install.in b/config/cmake/hdf5-config.cmake.install.in
index a851915..bc253e2 100644
--- a/config/cmake/hdf5-config.cmake.install.in
+++ b/config/cmake/hdf5-config.cmake.install.in
@@ -58,16 +58,16 @@ SET (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
# Don't include targets if this file is being picked up by another
# project which has already built hdf5 as a subproject
#-----------------------------------------------------------------------------
-IF (NOT TARGET "hdf5")
+IF (NOT TARGET "@HDF5_PACKAGE@")
IF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
- INCLUDE (${SELF_DIR}/../ZLIB/ZLIB-targets.cmake)
+ INCLUDE (${SELF_DIR}/../ZLIB/ZLIB@HDF_PACKAGE_EXT@-targets.cmake)
ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "zlib")
IF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- INCLUDE (${SELF_DIR}/../SZIP/SZIP-targets.cmake)
+ INCLUDE (${SELF_DIR}/../SZIP/SZIP@HDF_PACKAGE_EXT@-targets.cmake)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND HDF5_PACKAGE_EXTLIBS AND NOT TARGET "szip")
- INCLUDE (${SELF_DIR}/hdf5-targets.cmake)
+ INCLUDE (${SELF_DIR}/@HDF5_PACKAGE@@HDF_PACKAGE_EXT@-targets.cmake)
SET (HDF5_LIBRARIES "@HDF5_LIBRARIES_TO_EXPORT@")
-ENDIF (NOT TARGET "hdf5")
+ENDIF (NOT TARGET "@HDF5_PACKAGE@")
#-----------------------------------------------------------------------------
# Unfinished
diff --git a/config/cmake/libhdf5.settings.cmake.in b/config/cmake/libhdf5.settings.cmake.in
index 4027c55..22b223a 100644
--- a/config/cmake/libhdf5.settings.cmake.in
+++ b/config/cmake/libhdf5.settings.cmake.in
@@ -1,4 +1,4 @@
- SUMMARY OF THE HDF5 CONFIGURATION
+ SUMMARY OF THE @HDF5_PACKAGE@ CONFIGURATION
=================================
General Information: