cmake: fix version in soname

This commit is contained in:
Peter Wu 2016-02-11 23:06:35 +01:00
parent 7a86758edb
commit ea6eed10c7
2 changed files with 3 additions and 2 deletions

View File

@ -35,6 +35,8 @@ set(LT_AGE 4)
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(Version) include(Version)
math(EXPR LT_SOVERSION "${LT_CURRENT} - ${LT_AGE}")
set(LT_VERSION "${LT_SOVERSION}.${LT_AGE}.${LT_REVISION}")
set(PACKAGE_VERSION "${PROJECT_VERSION}") set(PACKAGE_VERSION "${PROJECT_VERSION}")
HexVersion(PACKAGE_VERSION_NUM ${PROJECT_VERSION_MAJOR} ${PROJECT_VERSION_MINOR} ${PROJECT_VERSION_PATCH}) HexVersion(PACKAGE_VERSION_NUM ${PROJECT_VERSION_MAJOR} ${PROJECT_VERSION_MINOR} ${PROJECT_VERSION_PATCH})

View File

@ -27,8 +27,7 @@ add_library(nghttp2 SHARED ${NGHTTP2_SOURCES})
#target_link_libraries(nghttp2 ...) #target_link_libraries(nghttp2 ...)
set_target_properties(nghttp2 PROPERTIES set_target_properties(nghttp2 PROPERTIES
COMPILE_FLAGS "${WARNCFLAGS} ${EXTRACFLAG}" COMPILE_FLAGS "${WARNCFLAGS} ${EXTRACFLAG}"
VERSION ${LT_CURRENT}.${LT_REVISION}.${LT_AGE} VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION})
SOVERSION ${LT_CURRENT})
install(TARGETS nghttp2 install(TARGETS nghttp2
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")