summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Versace <chad.versace@linux.intel.com>2012-04-09 08:51:20 -0700
committerChad Versace <chad.versace@linux.intel.com>2012-04-09 08:55:09 -0700
commitc666fce44803ec436188355c99d955d8693b41c4 (patch)
tree76cceaa09a24c86f51b791abf7435991e6ff67a7
parentcb71190fb6f12480a279491a12d9e4089f124b92 (diff)
cmake: Move def of library version to top CMakeLists
Now, the release version and the library version are defined alongside each other. This should prevent someone from updating one and forgetting the other. Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r--CMakeLists.txt11
-rw-r--r--src/waffle/CMakeLists.txt4
2 files changed, 11 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8d82b21..6d70e0a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,9 +13,18 @@
# limitations under the License.
project(waffle C)
-set(waffle_version 0.0)
cmake_minimum_required(VERSION 2.8)
+# Release version.
+set(waffle_version 0.0)
+
+# Library version.
+#
+# The library version scheme follows the libtool guidelines and is independent
+# of the release version. It is appended to libwaffle.so as libwaffle.so.X.X.X.
+# See http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html.
+set(waffle_so_version "0.0.0")
+
# ------------------------------------------------------------------------------
# Waffle Options
# ------------------------------------------------------------------------------
diff --git a/src/waffle/CMakeLists.txt b/src/waffle/CMakeLists.txt
index 1b769de..42add13 100644
--- a/src/waffle/CMakeLists.txt
+++ b/src/waffle/CMakeLists.txt
@@ -52,12 +52,10 @@ if(waffle_has_x11_egl)
target_link_libraries(waffle ${waffle_X11-xcb_library})
endif(waffle_has_x11_egl)
-# The version scheme for libwaffle.so follows the libtool guidelines
-# (http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html).
set_target_properties(waffle
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib
- SOVERSION 0.0.0)
+ SOVERSION ${waffle_so_version})
install(TARGETS waffle
LIBRARY DESTINATION ${waffle_install_libdir})