diff options
author | Chad Versace <chad.versace@linux.intel.com> | 2013-08-19 22:20:44 -0700 |
---|---|---|
committer | Chad Versace <chad.versace@linux.intel.com> | 2013-08-19 23:24:53 -0700 |
commit | cc7a3345b97fd957d4e74b39caff80a992971879 (patch) | |
tree | da0cded224d5d57c91d2f5378becb4138b619223 | |
parent | 6ab712446b707476e3c19fb9ea1dab51ab200fc1 (diff) |
cmake: Define version numbers in new module WaffleVersion
This change belongs to a series that cleans up the toplevel CMakeLists
by decompositing it into modules.
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
-rw-r--r-- | CMakeLists.txt | 27 | ||||
-rw-r--r-- | cmake/Modules/WaffleDefineVersion.cmake | 53 |
2 files changed, 54 insertions, 26 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8829029..c6d5da1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,38 +27,13 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules") project(waffle C) cmake_minimum_required(VERSION 2.8) -# ----------------------------------------------------------------------------- -# Version Numbers -# ----------------------------------------------------------------------------- - -# See /doc/versioning-rules.txt. - -# -# Release versions. -# -# !!! Must be updated in tandem with the Android.mk !!! -# -set(waffle_major_version "1") -set(waffle_minor_version "2") -set(waffle_patch_version "75") - -set(waffle_version "${waffle_major_version}.${waffle_minor_version}.${waffle_patch_version}") - - -# -# Library versions. -# -# On Linux, libwaffle's filename is: -# libwaffle-MAJOR.so.0.MINOR.PATCH -# -set(waffle_libname "waffle-${waffle_major_version}") -set(waffle_soversion "0") # ------------------------------------------------------------------------------ # Includes # ------------------------------------------------------------------------------ include(Options.cmake) +include(WaffleDefineVersion) include(WaffleCheckThreadLocalStorage) # diff --git a/cmake/Modules/WaffleDefineVersion.cmake b/cmake/Modules/WaffleDefineVersion.cmake new file mode 100644 index 0000000..c73810a --- /dev/null +++ b/cmake/Modules/WaffleDefineVersion.cmake @@ -0,0 +1,53 @@ +# Copyright 2013 Intel Corporation +# +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# - Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# - Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# +# Waffle's version scheme follows the rules [1] set by the Apache Portable +# Runtime Project. The scheme allows multiple versions of a library and its +# headers to be installed in parallel. +# +# [1] http://apr.apache.org/versioning.html +# + +# +# Release versions. +# +# !!! Must be updated in tandem with the Android.mk !!! +# +set(waffle_major_version "1") +set(waffle_minor_version "2") +set(waffle_patch_version "75") + +set(waffle_version "${waffle_major_version}.${waffle_minor_version}.${waffle_patch_version}") + + +# +# Library versions. +# +# On Linux, libwaffle's filename is: +# libwaffle-MAJOR.so.0.MINOR.PATCH +# +set(waffle_libname "waffle-${waffle_major_version}") +set(waffle_soversion "0") |