CMakeLists.txt: simplify updating SO_FILE_VERSION

do the math and apply the correct ordering directly rather than
describing the process to avoid any errors in interpretation.

Change-Id: I15461db4f981f649ec2a3fd07502fe56bc0ad29e
(cherry picked from commit 6275f3ce74950e28ccbfc92c6d6ac9da7e5608a3)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 39369c7..e86ab95 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,22 +32,24 @@
   endif()
 endif()
 
-# Updating version info.
+# Library version info. Update LT_CURRENT, LT_REVISION and LT_AGE when making a
+# public release by following the guidelines in the libtool document:
 # https://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info
-# c=<current>, a=<age>, r=<revision>
 #
-# libtool generates .so file as .so.[c-a].a.r, while -version-info c:r:a is
+# c=<current>, r=<revision>, a=<age>
+#
+# libtool generates a .so file as .so.[c-a].a.r, while -version-info c:r:a is
 # passed to libtool.
 #
 # We set SO_FILE_VERSION = [c-a].a.r
-#
-# To determine those two variables, calculate c,a,r with current SO_FILE_VERSION
-# then follow the rules in the link to detemine the new version (c1, a1, r1) and
-# set SO_FILE_VERSION to [c1-a1].a1.r1
-#
-# SO_VERSION should be set to c1-a1
-set(SO_VERSION 3)
-set(SO_FILE_VERSION 3.0.0)
+set(LT_CURRENT 3)
+set(LT_REVISION 0)
+set(LT_AGE 0)
+math(EXPR SO_VERSION "${LT_CURRENT} - ${LT_AGE}")
+set(SO_FILE_VERSION "${SO_VERSION}.${LT_AGE}.${LT_REVISION}")
+unset(LT_CURRENT)
+unset(LT_REVISION)
+unset(LT_AGE)
 
 include("${AOM_ROOT}/build/cmake/aom_configure.cmake")
 include("${AOM_ROOT}/aom_dsp/aom_dsp.cmake")