Backported version calculation fix.
@@ -60,16 +60,15 @@ if (NOT PUPNP_VERSION_STRING)
file (APPEND ${CMAKE_CURRENT_BINARY_DIR}/autoconfig.h.cm "#cmakedefine ${CMAKE_MATCH_1} 1\n\n")
list (APPEND WRITTEN_VARS ${CMAKE_MATCH_1})
elseif (line MATCHES "^AC_SUBST.*LT_VERSION_IXML, ([0-9]*):([0-9]*):([0-9]*).*")
- set (IXML_VERSION_MAJOR ${CMAKE_MATCH_1} CACHE STRING "Majorversion of libixml" FORCE)
- set (IXML_VERSION ${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3} CACHE STRING "Version of libixml" FORCE)
- message (STATUS "Setting ixml-version to ${IXML_VERSION}")
+ math (EXPR IXML_MAJ "${CMAKE_MATCH_1} - ${CMAKE_MATCH_3}")
+ set (IXML_SOMAJOR ${IXML_MAJ} CACHE STRING "Major version of ixml" FORCE)
+ set (IXML_SOVERSION ${IXML_MAJ}.${CMAKE_MATCH_3}.${CMAKE_MATCH_2} CACHE STRING "Version of libixml" FORCE)
+ message (STATUS "Setting ixml-soversion to ${IXML_SOVERSION}")
elseif (line MATCHES "^AC_SUBST.*LT_VERSION_UPNP, ([0-9]*):([0-9]*):([0-9]*).*")
- set (UPNP_VERSION_MAJOR ${CMAKE_MATCH_1} CACHE STRING "Majorversion of libupnp" FORCE)
- set (UPNP_VERSION_MINOR ${CMAKE_MATCH_2} CACHE STRING "Minorversion of libupnp" FORCE)
- set (UPNP_VERSION_PATCH ${CMAKE_MATCH_3} CACHE STRING "Patchversion of libupnp" FORCE)
- set (UPNP_VERSION ${CMAKE_MATCH_1}.${CMAKE_MATCH_2}.${CMAKE_MATCH_3} CACHE STRING "Version of libupnp" FORCE)
- set (UPNP_VERSION_STRING ${UPNP_VERSION} CACHE STRING "see upnpconfig.h" FORCE)
- message (STATUS "Setting upnp-version to ${UPNP_VERSION}")
+ math (EXPR UPNP_MAJ "${CMAKE_MATCH_1} - ${CMAKE_MATCH_3}")
+ set (UPNP_SOMAJOR ${UPNP_MAJ} CACHE STRING "Major version of upnp" FORCE)
+ set (UPNP_SOVERSION ${UPNP_MAJ}.${CMAKE_MATCH_3}.${CMAKE_MATCH_2} CACHE STRING "Version of libupnp" FORCE)
+ message (STATUS "Setting upnp-soversion to ${UPNP_SOVERSION}")
endif()
endforeach()
endforeach()
