From 8b73e96eae05f7a7c866780a7219fff1c4caf3a0 Mon Sep 17 00:00:00 2001 From: "Geoff R. McLane" Date: Wed, 6 Aug 2014 14:36:33 +0200 Subject: [PATCH] set SOVERSION for install --- CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ef4f65..624e1d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,11 @@ cmake_minimum_required (VERSION 2.8) project (tidy5) # ### NOTE: *** Adjust when required *** +set( TIDY_MAJOR_VERSION 1 ) +set( TIDY_MINOR_VERSION 0 ) +set( TIDY_MICRO_VERSION 0 ) +set( LIBTIDY_VERSION "${TIDY_MAJOR_VERSION}.${TIDY_MINOR_VERSION}.${TIDY_MICRO_VERSION}" ) +# establish version date set( tidy_YEAR 2014 ) set( tidy_MONTH 08 ) set( tidy_DAY 03 ) @@ -106,11 +111,17 @@ else () endif () add_library ( ${name} ${LIB_TYPE} ${CFILES} ${HFILES} ${LIBHFILES} ) list ( APPEND add_LIBS ${name} ) +if (NOT MSVC) + set_target_properties( ${name} PROPERTIES + VERSION ${LIBTIDY_VERSION} + SOVERSION ${TIDY_MAJOR_VERSION} ) +endif () install(TARGETS ${name} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) +install( FILES ${HFILES} DESTINATION include ) ########################################################## ### main executable