Skip to content

Commit

Permalink
Add (shared) library versioning
Browse files Browse the repository at this point in the history
Closes: #223
  • Loading branch information
gjasny committed Dec 15, 2018
1 parent cecda44 commit 8df119d
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)

project(prometheus-cpp)
project(prometheus-cpp VERSION 0.7.0)

include(GNUInstallDirs)

Expand Down
7 changes: 6 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ target_include_directories(core
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)

set_target_properties(core PROPERTIES OUTPUT_NAME ${PROJECT_NAME}-core)
set_target_properties(core
PROPERTIES
OUTPUT_NAME ${PROJECT_NAME}-core
VERSION "${PROJECT_VERSION}"
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
)

install(
TARGETS core
Expand Down
7 changes: 6 additions & 1 deletion pull/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ target_compile_definitions(pull
$<$<BOOL:${ENABLE_COMPRESSION}>:HAVE_ZLIB>
)

set_target_properties(pull PROPERTIES OUTPUT_NAME ${PROJECT_NAME}-pull)
set_target_properties(pull
PROPERTIES
OUTPUT_NAME ${PROJECT_NAME}-pull
VERSION "${PROJECT_VERSION}"
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
)

install(
TARGETS pull
Expand Down
7 changes: 6 additions & 1 deletion push/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ target_include_directories(push
${CURL_INCLUDE_DIRS}
)

set_target_properties(push PROPERTIES OUTPUT_NAME ${PROJECT_NAME}-push)
set_target_properties(push
PROPERTIES
OUTPUT_NAME ${PROJECT_NAME}-push
VERSION "${PROJECT_VERSION}"
SOVERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}"
)

install(
TARGETS push
Expand Down

0 comments on commit 8df119d

Please sign in to comment.