diff --git a/CMakeLists.txt b/CMakeLists.txt index 4b4c8226..bc160311 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,13 @@ set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules" ) find_package(Qt4 REQUIRED) +SET(QCA_LIB_MAJOR_VERSION "2") +SET(QCA_LIB_MINOR_VERSION "0") +SET(QCA_LIB_PATCH_VERSION "0") + +SET(QCA_LIB_VERSION_STRING "${QCA_LIB_MAJOR_VERSION}.${QCA_LIB_MINOR_VERSION}.${QCA_LIB_PATCH_VERSION}") + + if (APPLE) find_package(Carbon REQUIRED) set(CMAKE_INSTALL_NAME_DIR ${LIB_INSTALL_DIR}) diff --git a/qca.pc.cmake b/qca.pc.cmake index 47d15966..3e4a579b 100644 --- a/qca.pc.cmake +++ b/qca.pc.cmake @@ -5,7 +5,7 @@ includedir=@CMAKE_INSTALL_PREFIX@/include/QtCrypto Name: QCA Description: Qt Cryptographic Architecture library\n -Version: 2.0.0 #maybe this shouldn't be literal... +Version: @QCA_LIB_VERSION_STRING@ Requires: QtCore Libs: -L${libdir} -lqca Cflags: -I${includedir} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b50e96ac..8e0da44f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -146,7 +146,7 @@ if(APPLE) TARGET_LINK_LIBRARIES(qca ${CARBON_LIBRARY} ${CARBON_LIBRARY_SECURITY}) endif(APPLE) -set_target_properties(qca PROPERTIES VERSION 2.0.0 SOVERSION 2 ) +set_target_properties(qca PROPERTIES VERSION ${QCA_LIB_MAJOR_VERSION}.${QCA_LIB_MINOR_VERSION}.${QCA_LIB_PATCH_VERSION} SOVERSION ${QCA_LIB_MAJOR_VERSION} ) INSTALL(TARGETS qca DESTINATION ${LIB_INSTALL_DIR})