Add a Ceres version and use it to name the DLL.

Change-Id: Ia7adff8219af66d3c7fbb2e1e39da396323ba545
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 51284f1..c1f7b56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,6 +36,16 @@
 
 PROJECT(CERES C CXX)
 
+# Important: Always bump the second number (e.g. 1.3.x to 1.4.0) for any
+# release that changes the ABI. The ABI changes for almost any modification to
+# include/ceres (e.g. the public API). If you are unsure about whether
+# something is an ABI change, please ask on the list.
+#
+# For versions without ABI changes, bump the smallest number in CERES_VERSION,
+# but leave the CERES_ABI_VERSION unchanged.
+SET(CERES_VERSION 1.3.0)
+SET(CERES_ABI_VERSION 1.3.0)
+
 ENABLE_TESTING()
 
 OPTION(BUILD_TESTING
diff --git a/internal/ceres/CMakeLists.txt b/internal/ceres/CMakeLists.txt
index 8a3917b..f2fc827 100644
--- a/internal/ceres/CMakeLists.txt
+++ b/internal/ceres/CMakeLists.txt
@@ -150,6 +150,9 @@
 
 ADD_LIBRARY(ceres_shared SHARED ${CERES_LIBRARY_SOURCE})
 TARGET_LINK_LIBRARIES(ceres_shared ${CERES_LIBRARY_DEPENDENCIES})
+SET_TARGET_PROPERTIES(ceres_shared PROPERTIES
+    VERSION ${CERES_VERSION}
+    SOVERSION ${CERES_ABI_VERSION})
 
 IF (${BUILD_TESTING})
   ADD_LIBRARY(gtest gmock_gtest_all.cc gmock_main.cc)