summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2018-09-06 09:18:07 -0700
committerMathias Preiner <mathias.preiner@gmail.com>2018-09-22 16:30:59 -0700
commit76bd881a535fa2969dfebbe96a62115e41ed223e (patch)
treea4f3912be83cb3c131f95ef80d5afdf8ab1cbc57
parent2e931a009cc474a6c326fc9a1b1b289198a50838 (diff)
cmake: Add library versioning for libcvc4.so.
-rw-r--r--CMakeLists.txt6
-rw-r--r--src/CMakeLists.txt7
-rw-r--r--src/parser/CMakeLists.txt7
3 files changed, 19 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 264daa615..f46d3ce30 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ project(cvc4)
# Major component of the version of CVC4.
set(CVC4_MAJOR 1)
# Minor component of the version of CVC4.
-set(CVC4_MINOR 6)
+set(CVC4_MINOR 7)
# Release component of the version of CVC4.
set(CVC4_RELEASE 0)
# Extraversion component of the version of CVC4.
@@ -23,6 +23,10 @@ endif()
# Define to the full name of this package.
set(PACKAGE_NAME "${PROJECT_NAME}")
+# Shared library versioning. Increment SOVERSION for every new CVC4 release.
+set(CVC4_VERSION "${CVC4_MAJOR}.${CVC4_MINOR}.${CVC4_RELEASE}")
+set(CVC4_SOVERSION 5)
+
#### These defines are only use in autotools make files, will likely be
#### replaced with corresponding CPack stuff
## Define to the full name and version of this package.
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8e8e0bd45..2e818bad5 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -605,6 +605,13 @@ set(cvc4_gen_src_files
set_source_files_properties(${cvc4_gen_src_files} PROPERTIES GENERATED TRUE)
add_library(cvc4 ${cvc4_src_files} ${cvc4_gen_src_files})
+
+set_target_properties(cvc4
+ PROPERTIES
+ VERSION ${CVC4_VERSION}
+ SOVERSION ${CVC4_SOVERSION}
+)
+
target_compile_definitions(cvc4
PRIVATE
-D__BUILDING_CVC4LIB
diff --git a/src/parser/CMakeLists.txt b/src/parser/CMakeLists.txt
index ce4b354f3..6a7f77ea3 100644
--- a/src/parser/CMakeLists.txt
+++ b/src/parser/CMakeLists.txt
@@ -24,6 +24,13 @@ set(cvc4parser_src_files
)
add_library(cvc4parser ${cvc4parser_src_files})
+
+set_target_properties(cvc4parser
+ PROPERTIES
+ VERSION ${CVC4_VERSION}
+ SOVERSION ${CVC4_SOVERSION}
+)
+
target_compile_definitions(cvc4parser PRIVATE -D__BUILDING_CVC4PARSERLIB)
target_link_libraries(cvc4parser parsercvc parsersmt1 parsersmt2 parsertptp cvc4)
target_link_libraries(cvc4parser ${ANTLR_LIBRARIES})
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback