diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-08-06 16:40:49 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-08-06 16:40:49 (GMT) |
commit | 65b620ea499fd397a0e949f8ddc9874e5cb6a7d6 (patch) | |
tree | 08c82eb92ec851be47572069036836a9ecba05ea | |
parent | c2491932d95b853304780bffa0929128e5721d5b (diff) | |
download | hdf5-65b620ea499fd397a0e949f8ddc9874e5cb6a7d6.zip hdf5-65b620ea499fd397a0e949f8ddc9874e5cb6a7d6.tar.gz hdf5-65b620ea499fd397a0e949f8ddc9874e5cb6a7d6.tar.bz2 |
[svn-r22634] Update CMake configuration files for current packaging layout
-rw-r--r-- | config/cmake/H5pubconf.h.in | 18 | ||||
-rw-r--r-- | config/cmake/HDFLibMacros.cmake | 6 | ||||
-rwxr-xr-x | config/cmake/cacheinit.cmake | 6 | ||||
-rw-r--r-- | config/cmake/hdf5-config.cmake.build.in | 12 | ||||
-rw-r--r-- | config/cmake/hdf5-config.cmake.install.in | 34 |
5 files changed, 29 insertions, 47 deletions
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index d0a182b..4745696 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 6a3baa1..312e9f3 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)
@@ -67,3 +69,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..6b90496 100644 --- a/config/cmake/hdf5-config.cmake.install.in +++ b/config/cmake/hdf5-config.cmake.install.in @@ -4,7 +4,9 @@ GET_FILENAME_COMPONENT (SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${SELF_DIR}" PATH)
GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
-GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+IF (NOT WIN32)
+ GET_FILENAME_COMPONENT(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH)
+ENDIF (NOT WIN32)
#-----------------------------------------------------------------------------
# User Options
@@ -58,34 +60,14 @@ 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_PACKAGE_NAME@@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_PACKAGE_NAME@@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
-#-----------------------------------------------------------------------------
-#
-# To be continued (maybe) ...
-#
-# XXX_INCLUDE_DIRS no, use one per library as in HDF5_FORTRAN_INCLUDE_DIR
-# XXX_LIBRARIES not needed - see hdf5-targets.cmake
-# 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 <jpeg.h>
-# 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.
|