summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-05-04 19:42:03 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-05-04 19:42:03 (GMT)
commit2ee184118709356cfada5dd510d26148183b9259 (patch)
treea94070b99ccaffc6fee18c2d2bb19cd6e06ed9d5
parenta2f52de36df0385588493d4e620c5f6471aa53c0 (diff)
downloadhdf5-2ee184118709356cfada5dd510d26148183b9259.zip
hdf5-2ee184118709356cfada5dd510d26148183b9259.tar.gz
hdf5-2ee184118709356cfada5dd510d26148183b9259.tar.bz2
[svn-r20721] Refactor ext lib import and install.
Add SOVERSION for linux
-rw-r--r--CMakeLists.txt29
-rw-r--r--config/cmake/HDFMacros.cmake4
-rw-r--r--tools/lib/ph5diff.h10
3 files changed, 31 insertions, 12 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 13c0df4..3f2ad45 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -743,14 +743,23 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
DESTINATION ${HDF5_INSTALL_EXTLIB_DIR}
COMPONENT libraries
)
- IF (WIN32 AND BUILD_SHARED_LIBS)
+ IF (BUILD_SHARED_LIBS)
+ IF (WIN32)
GET_PROPERTY (ZLIB_IMPLIB TARGET ${ZLIB_LIBRARY} PROPERTY IMPORTLIBRARY_${BLDTYPE})
INSTALL(
FILES ${ZLIB_IMPLIB}
DESTINATION ${HDF5_INSTALL_LIB_DIR}
COMPONENT libraries
)
- ENDIF (WIN32 AND BUILD_SHARED_LIBS)
+ ELSE (WIN32)
+ GET_PROPERTY (ZLIB_SOVERSION TARGET ${ZLIB_LIBRARY} PROPERTY SOVERSION)
+ INSTALL(
+ FILES ${ZLIB_LIB}.${ZLIB_SOVERSION}
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}
+ COMPONENT libraries
+ )
+ ENDIF (WIN32)
+ ENDIF (BUILD_SHARED_LIBS)
ENDIF (HDF5_ENABLE_Z_LIB_SUPPORT AND ZLIB_FOUND)
IF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
INSTALL (
@@ -764,14 +773,23 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
DESTINATION ${HDF5_INSTALL_EXTLIB_DIR}
COMPONENT libraries
)
- IF (WIN32 AND BUILD_SHARED_LIBS)
+ IF (BUILD_SHARED_LIBS)
+ IF (WIN32)
GET_PROPERTY (SZIP_IMPLIB TARGET ${SZIP_LIBRARY} PROPERTY IMPORTLIBRARY_${BLDTYPE})
INSTALL(
FILES ${SZIP_IMPLIB}
DESTINATION ${HDF5_INSTALL_LIB_DIR}
COMPONENT libraries
)
- ENDIF (WIN32 AND BUILD_SHARED_LIBS)
+ ELSE (WIN32)
+ GET_PROPERTY (SZIP_SOVERSION TARGET ${SZIP_LIBRARY} PROPERTY SOVERSION)
+ INSTALL(
+ FILES ${SZIP_LIB}.${SZIP_SOVERSION}
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}
+ COMPONENT libraries
+ )
+ ENDIF (WIN32)
+ ENDIF (BUILD_SHARED_LIBS)
ENDIF (HDF5_ENABLE_SZIP_SUPPORT AND SZIP_FOUND)
INSTALL (
FILES ${EXTERNAL_HEADER_LIST}
@@ -875,7 +893,6 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
SET (release_files
${release_files}
${HDF5_SOURCE_DIR}/release_docs/INSTALL_Cygwin.txt
- ${HDF5_SOURCE_DIR}/release_docs/INSTALL_MinGW.txt
${HDF5_SOURCE_DIR}/release_docs/INSTALL_VMS.txt
)
ENDIF (WIN32 AND NOT CYGWIN)
@@ -910,8 +927,6 @@ IF (NOT HDF5_EXTERNALLY_CONFIGURED)
SET (CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/release_docs/RELEASE.txt")
ENDIF (EXISTS "${HDF5_SOURCE_DIR}/release_docs")
SET (CPACK_PACKAGE_RELOCATABLE TRUE)
- #only needed for cmake 2.8.3
- SET (CPACK_MONOLITHIC_INSTALL 1)
IF (WIN32)
SET (CPACK_NSIS_CONTACT "help@hdfgroup.org")
SET (CPACK_NSIS_MODIFY_PATH ON)
diff --git a/config/cmake/HDFMacros.cmake b/config/cmake/HDFMacros.cmake
index 345c50d..2d7773e 100644
--- a/config/cmake/HDFMacros.cmake
+++ b/config/cmake/HDFMacros.cmake
@@ -143,6 +143,8 @@ MACRO (EXTERNAL_SZIP_LIBRARY compress_type libtype encoding)
ELSE (WIN32 AND NOT MINGW)
SET_TARGET_PROPERTIES(szip PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}szip${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ IMPORTED_SONAME "${CMAKE_SHARED_LIBRARY_PREFIX}szip${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}.2.1"
+ SOVERSION "2.1"
)
ENDIF (WIN32 AND NOT MINGW)
ELSE (${libtype} MATCHES "SHARED")
@@ -237,6 +239,8 @@ MACRO (EXTERNAL_ZLIB_LIBRARY compress_type libtype)
ELSE (WIN32 AND NOT MINGW)
SET_TARGET_PROPERTIES(zlib PROPERTIES
IMPORTED_LOCATION "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}z${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}"
+ IMPORTED_SONAME "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${CMAKE_SHARED_LIBRARY_PREFIX}z${DBG_EXT}${CMAKE_SHARED_LIBRARY_SUFFIX}.1.2"
+ SOVERSION "1.2"
)
ENDIF (WIN32 AND NOT MINGW)
ELSE (${libtype} MATCHES "SHARED")
diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h
index 0e454c8..eb15f12 100644
--- a/tools/lib/ph5diff.h
+++ b/tools/lib/ph5diff.h
@@ -30,11 +30,11 @@
#define MPI_TAG_END 7
#define MPI_TAG_PARALLEL 8
-extern int g_nTasks;
-extern unsigned char g_Parallel;
-extern char outBuff[];
-extern int outBuffOffset;
-extern FILE * overflow_file;
+H5TOOLS_DLLVAR int g_nTasks;
+H5TOOLS_DLLVAR unsigned char g_Parallel;
+H5TOOLS_DLLVAR char outBuff[];
+H5TOOLS_DLLVAR int outBuffOffset;
+H5TOOLS_DLLVAR FILE * overflow_file;
struct diff_args
{