aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt9
1 files changed, 4 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e4642f3a..ca597469 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.1)
-project(qmatrixclient CXX)
+set(API_VERSION "0.6")
+project(qmatrixclient VERSION "${API_VERSION}.0" LANGUAGES CXX)
option(QMATRIXCLIENT_INSTALL_EXAMPLE "install qmc-example application" ON)
@@ -58,6 +59,7 @@ message( STATUS )
message( STATUS "=============================================================================" )
message( STATUS " libqmatrixclient Build Information" )
message( STATUS "=============================================================================" )
+message( STATUS "Version: ${PROJECT_VERSION}, API version: ${API_VERSION}")
if (CMAKE_BUILD_TYPE)
message( STATUS "Build type: ${CMAKE_BUILD_TYPE}")
endif(CMAKE_BUILD_TYPE)
@@ -145,9 +147,7 @@ add_library(QMatrixClient ${libqmatrixclient_SRCS}
${libqmatrixclient_job_SRCS} ${libqmatrixclient_csdef_SRCS}
${libqmatrixclient_cswellknown_SRCS}
${libqmatrixclient_asdef_SRCS} ${libqmatrixclient_isdef_SRCS})
-set(API_VERSION "0.6")
-set(FULL_VERSION "${API_VERSION}.0")
-set_property(TARGET QMatrixClient PROPERTY VERSION "${FULL_VERSION}")
+set_property(TARGET QMatrixClient PROPERTY VERSION "${PROJECT_VERSION}")
set_property(TARGET QMatrixClient PROPERTY SOVERSION ${API_VERSION} )
set_property(TARGET QMatrixClient PROPERTY
INTERFACE_QMatrixClient_MAJOR_VERSION ${API_VERSION})
@@ -179,7 +179,6 @@ include(CMakePackageConfigHelpers)
# Maybe consider jumping the gun and releasing 1.0, as semver advises?
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/QMatrixClient/QMatrixClientConfigVersion.cmake"
- VERSION ${FULL_VERSION}
COMPATIBILITY SameMajorVersion
)