Skip to content

Commit

Permalink
CMakeLists.txt: API version should be 0.5.1 instead of 0.5
Browse files Browse the repository at this point in the history
Also: modernised version setting.
  • Loading branch information
KitsuneRal committed Apr 6, 2019
1 parent edf6a71 commit 613e375
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.1)

project(qmatrixclient CXX)
set(API_VERSION "0.5.1") # Normally it should just include major.minor
project(qmatrixclient VERSION "${API_VERSION}.1" LANGUAGES CXX)

option(QMATRIXCLIENT_INSTALL_EXAMPLE "install qmc-example application" ON)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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.5")
set(FULL_VERSION "${API_VERSION}.1")
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})
Expand Down Expand Up @@ -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
)

Expand Down

0 comments on commit 613e375

Please sign in to comment.