Skip to content

Commit

Permalink
Separate the library version from the project version
Browse files Browse the repository at this point in the history
To make it easier to maintain things in the future in case of any
ABI or API breaks, split the library versioning to a new variable.
  • Loading branch information
dobey committed Jun 16, 2022
1 parent b2a2c3c commit 5500d44
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cmake_minimum_required(VERSION 3.5)

project(maliit-framework VERSION 2.2.1)
project(maliit-framework VERSION 2.99.0)
set(LIBRARY_VERSION 3.0.0)

# Build options

Expand Down Expand Up @@ -203,8 +204,8 @@ target_link_libraries(maliit-plugins PRIVATE maliit-common maliit-connection ${P
target_link_libraries(maliit-plugins PUBLIC Qt5::Core Qt5::Gui Qt5::Quick)
target_include_directories(maliit-plugins PRIVATE ${PLUGINS_INCLUDE_DIRS})

set_target_properties(maliit-plugins PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION}
set_target_properties(maliit-plugins PROPERTIES
VERSION ${LIBRARY_VERSION}
EXPORT_NAME Maliit::Plugins)

if(enable-glib)
Expand Down Expand Up @@ -242,8 +243,8 @@ if(enable-glib)
add_library(maliit-glib SHARED ${GLIB_SOURCES} ${GLIB_HEADER})
target_include_directories(maliit-glib PUBLIC ${GIO_INCLUDE_DIRS})
target_link_libraries(maliit-glib ${GIO_LIBRARIES})
set_target_properties(maliit-glib PROPERTIES SOVERSION ${PROJECT_VERSION_MAJOR}
VERSION ${PROJECT_VERSION}
set_target_properties(maliit-glib PROPERTIES
VERSION ${LIBRARY_VERSION}
EXPORT_NAME Maliit::GLib)
endif()

Expand Down

0 comments on commit 5500d44

Please sign in to comment.