From fb362ef88003041e0ea7236deaba5387df205390 Mon Sep 17 00:00:00 2001 From: vitaut Date: Wed, 8 Apr 2015 07:13:06 -0700 Subject: [PATCH] Set .so version for libformat --- CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c51acd63..4a91b015 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -160,6 +160,14 @@ endif () enable_testing() add_subdirectory(test) +set(CPACK_PACKAGE_VERSION_MAJOR 1) +set(CPACK_PACKAGE_VERSION_MINOR 2) +set(CPACK_PACKAGE_VERSION_PATCH 0) +set(CPPFORMAT_VERSION + ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) +set_target_properties(format PROPERTIES + VERSION ${CPPFORMAT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}) + if (EXISTS .gitignore) # Get the list of ignored files from .gitignore. file (STRINGS ".gitignore" lines) @@ -173,11 +181,6 @@ if (EXISTS .gitignore) set(CPACK_SOURCE_GENERATOR ZIP) set(CPACK_SOURCE_IGNORE_FILES ${ignored_files}) - set(CPACK_PACKAGE_VERSION_MAJOR 1) - set(CPACK_PACKAGE_VERSION_MINOR 1) - set(CPACK_PACKAGE_VERSION_PATCH 0) - set(CPPFORMAT_VERSION - ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}) set(CPACK_SOURCE_PACKAGE_FILE_NAME cppformat-${CPPFORMAT_VERSION}) set(CPACK_RESOURCE_FILE_README ${FORMAT_SOURCE_DIR}/README.rst) include(CPack)