Skip to content

Commit eb2370e

Browse files
EddyTheCoAndreaRicchi
authored andcommitted
CMakeLists: Add VERSION and SOVERSION properties
The library files are versioned following standard UNIX conventions. Fix #19. Signed-off-by: Eduardo Gonzalez <eduardo.gonzalez@amarulasolutions.com>
1 parent 8f185f8 commit eb2370e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ include(GNUInstallDirs)
2222
set(DBUS_HEADERS include/amarula/dbus/gdbus.hpp include/amarula/dbus/gproxy.hpp)
2323

2424
add_library(GDbusProxy ${DBUS_HEADERS} src/dbus/gdbus.cpp)
25+
set_target_properties(GDbusProxy PROPERTIES VERSION ${PROJECT_VERSION}
26+
SOVERSION ${PROJECT_VERSION_MAJOR})
2527
add_library(Amarula::GDbusProxy ALIAS GDbusProxy)
2628
target_include_directories(
2729
GDbusProxy PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
@@ -57,7 +59,9 @@ if(BUILD_CONNMAN)
5759
include/amarula/dbus/connman/gagent.hpp
5860
src/dbus/gconnman_agent.cpp
5961
src/dbus/gdbus_private.hpp)
60-
62+
set_target_properties(
63+
GConnmanDbus PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION
64+
${PROJECT_VERSION_MAJOR})
6165
add_library(Amarula::GConnmanDbus ALIAS GConnmanDbus)
6266

6367
target_include_directories(

0 commit comments

Comments
 (0)