CMakeLists.txt: use PROJECT_VERSION and PROJECT_VERSION_MAJOR in dll version numbering

This commit is contained in:
Mario Emmenlauer 2018-07-22 11:52:13 +02:00
parent 9f20c3a75a
commit 1a089055b2

View File

@ -48,7 +48,10 @@ if(NOT ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} STRLESS 3.1 AND ";${CMAKE_C
target_compile_features(pugixml PUBLIC cxx_long_long_type)
endif()
set_target_properties(pugixml PROPERTIES VERSION ${pugixml_VERSION} SOVERSION 1)
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
SOVERSION ${PROJECT_VERSION_MAJOR}
POSITION_INDEPENDENT_CODE ON)
if(USE_VERSIONED_LIBDIR)
# Install library into its own directory under LIBDIR