summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/prop_tgt/FRAMEWORK.rst4
-rw-r--r--Help/prop_tgt/SOVERSION.rst25
-rw-r--r--Help/prop_tgt/VERSION.rst27
-rw-r--r--Modules/FindHDF5.cmake25
-rw-r--r--Modules/GetPrerequisites.cmake2
5 files changed, 65 insertions, 18 deletions
diff --git a/Help/prop_tgt/FRAMEWORK.rst b/Help/prop_tgt/FRAMEWORK.rst
index 6c212c3..8120c36 100644
--- a/Help/prop_tgt/FRAMEWORK.rst
+++ b/Help/prop_tgt/FRAMEWORK.rst
@@ -26,6 +26,10 @@ Example of creation ``dynamicFramework``:
FRAMEWORK_VERSION C
MACOSX_FRAMEWORK_IDENTIFIER com.cmake.dynamicFramework
MACOSX_FRAMEWORK_INFO_PLIST Info.plist
+ # "current version" in semantic format in Mach-O binary file
+ VERSION 16.4.0
+ # "compatibility version" in semantic format in Mach-O binary file
+ SOVERSION 1.0.0
PUBLIC_HEADER dynamicFramework.h
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer"
)
diff --git a/Help/prop_tgt/SOVERSION.rst b/Help/prop_tgt/SOVERSION.rst
index 672ff23..82b6b97 100644
--- a/Help/prop_tgt/SOVERSION.rst
+++ b/Help/prop_tgt/SOVERSION.rst
@@ -3,12 +3,25 @@ SOVERSION
What version number is this target.
-For shared libraries VERSION and SOVERSION can be used to specify the
-build version and API version respectively. When building or
+For shared libraries :prop_tgt:`VERSION` and ``SOVERSION`` can be used to
+specify the build version and API version respectively. When building or
installing appropriate symlinks are created if the platform supports
symlinks and the linker supports so-names. If only one of both is
specified the missing is assumed to have the same version number.
-SOVERSION is ignored if NO_SONAME property is set. For shared
-libraries and executables on Windows the VERSION attribute is parsed
-to extract a "major.minor" version number. These numbers are used as
-the image version of the binary.
+``SOVERSION`` is ignored if :prop_tgt:`NO_SONAME` property is set.
+
+Windows Versions
+^^^^^^^^^^^^^^^^
+
+For shared libraries and executables on Windows the :prop_tgt:`VERSION`
+attribute is parsed to extract a ``<major>.<minor>`` version number.
+These numbers are used as the image version of the binary.
+
+Mach-O Versions
+^^^^^^^^^^^^^^^
+
+For shared libraries and executables on Mach-O systems (e.g. OS X, iOS),
+the ``SOVERSION`` property corresponds to *compatibility version* and
+:prop_tgt:`VERSION` to *current version*. See the :prop_tgt:`FRAMEWORK` target
+property for an example. Versions of Mach-O binaries may be checked with the
+``otool -L <binary>`` command.
diff --git a/Help/prop_tgt/VERSION.rst b/Help/prop_tgt/VERSION.rst
index 87f6c49..66e7bde 100644
--- a/Help/prop_tgt/VERSION.rst
+++ b/Help/prop_tgt/VERSION.rst
@@ -3,14 +3,27 @@ VERSION
What version number is this target.
-For shared libraries VERSION and SOVERSION can be used to specify the
-build version and API version respectively. When building or
+For shared libraries ``VERSION`` and :prop_tgt:`SOVERSION` can be used
+to specify the build version and API version respectively. When building or
installing appropriate symlinks are created if the platform supports
symlinks and the linker supports so-names. If only one of both is
specified the missing is assumed to have the same version number. For
-executables VERSION can be used to specify the build version. When
+executables ``VERSION`` can be used to specify the build version. When
building or installing appropriate symlinks are created if the
-platform supports symlinks. For shared libraries and executables on
-Windows the VERSION attribute is parsed to extract a "major.minor"
-version number. These numbers are used as the image version of the
-binary.
+platform supports symlinks.
+
+Windows Versions
+^^^^^^^^^^^^^^^^
+
+For shared libraries and executables on Windows the ``VERSION``
+attribute is parsed to extract a ``<major>.<minor>`` version number.
+These numbers are used as the image version of the binary.
+
+Mach-O Versions
+^^^^^^^^^^^^^^^
+
+For shared libraries and executables on Mach-O systems (e.g. OS X, iOS),
+the :prop_tgt:`SOVERSION` property correspond to *compatibility version* and
+``VERSION`` to *current version*. See the :prop_tgt:`FRAMEWORK` target
+property for an example. Versions of Mach-O binaries may be checked with the
+``otool -L <binary>`` command.
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index bc0d50b..b074f63 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -362,20 +362,35 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
set(_suffix "-shared")
endif()
foreach(_lang ${HDF5_LANGUAGE_BINDINGS})
- get_target_property(_lang_location ${HDF5_${_component}_TARGET}${_suffix} LOCATION)
+
+ #Older versions of hdf5 don't have a static/shared suffix so
+ #if we detect that occurrence clear the suffix
+ if(_suffix AND NOT TARGET ${HDF5_${_lang}_TARGET}${_suffix})
+ if(NOT TARGET ${HDF5_${_lang}_TARGET})
+ #cant find this component with our without the suffix
+ #so bail out, and let the following locate HDF5
+ set(HDF5_FOUND FALSE)
+ break()
+ endif()
+ set(_suffix "")
+ endif()
+
+ get_target_property(_lang_location ${HDF5_${_lang}_TARGET}${_suffix} LOCATION)
if( _lang_location )
set(HDF5_${_lang}_LIBRARY ${_lang_location} CACHE PATH
"HDF5 ${_lang} library" )
mark_as_advanced(HDF5_${_lang}_LIBRARY)
list(APPEND HDF5_LIBRARIES ${HDF5_${_lang}_LIBRARY})
+ set(HDF5_${_lang}_LIBRARIES ${HDF5_${_lang}_LIBRARY})
endif()
if(FIND_HL)
get_target_property(_lang_hl_location ${HDF5_${_lang}_HL_TARGET}${_suffix} LOCATION)
- if( _lang_location )
- set(HDF5_${_lang}_HL_LIBRARY ${_lang_location} CACHE PATH
+ if( _lang_hl_location )
+ set(HDF5_${_lang}_HL_LIBRARY ${_lang_hl_location} CACHE PATH
"HDF5 ${_lang} HL library" )
- mark_as_advanced(HDF5_${_lang}_LIBRARY)
+ mark_as_advanced(HDF5_${_lang}_HL_LIBRARY)
list(APPEND HDF5_HL_LIBRARIES ${HDF5_${_lang}_HL_LIBRARY})
+ set(HDF5_${_lang}_HL_LIBRARIES ${HDF5_${_lang}_HL_LIBRARY})
endif()
endif()
endforeach()
@@ -411,6 +426,8 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
set(HDF5_${__lang}_DEFINITIONS)
set(HDF5_${__lang}_INCLUDE_DIRS)
set(HDF5_${__lang}_LIBRARIES)
+ set(HDF5_${__lang}_HL_LIBRARIES)
+
mark_as_advanced(HDF5_${__lang}_COMPILER_EXECUTABLE_NO_INTERROGATE)
mark_as_advanced(HDF5_${__lang}_DEFINITIONS)
mark_as_advanced(HDF5_${__lang}_INCLUDE_DIRS)
diff --git a/Modules/GetPrerequisites.cmake b/Modules/GetPrerequisites.cmake
index 375349f..aa5bf28 100644
--- a/Modules/GetPrerequisites.cmake
+++ b/Modules/GetPrerequisites.cmake
@@ -746,7 +746,7 @@ function(get_prerequisites target prerequisites_var exclude_system recurse exepa
set(gp_regex_error "")
set(gp_regex_fallback "")
set(gp_regex_cmp_count 1)
- # objdump generaates copious output so we create a grep filter to pre-filter results
+ # objdump generates copious output so we create a grep filter to pre-filter results
find_program(gp_grep_cmd grep)
if(gp_grep_cmd)
set(gp_cmd_maybe_filter COMMAND ${gp_grep_cmd} "^[[:blank:]]*DLL Name: ")