Browse Source

CMakeLists: Export the library so-name and the version properly.

This ensures we have the same behaviour as building with Autotools.

Signed-off-by: Björn Esser <besser82@fedoraproject.org>
pull/510/head
Björn Esser 6 years ago
parent
commit
f4d847e44c
No known key found for this signature in database GPG Key ID: F52E98007594C21D
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      CMakeLists.txt

+ 7
- 0
CMakeLists.txt View File

@@ -258,6 +258,13 @@ add_library(${PROJECT_NAME}
${JSON_C_HEADERS}
)

# Set the SO-VERSION and the build version for the built version.
set_target_properties(${PROJECT_NAME}
PROPERTIES
SOVERSION "5.0.0"
VERSION "${PROJECT_VERSION}"
)

# If json-c is used as subroject it set to target correct interface -I flags and allow
# to build external target without extra include_directories(...)
target_include_directories(${PROJECT_NAME}


Loading…
Cancel
Save