aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2010-10-03 20:08:13 +0000
committerAlexander Neundorf <neundorf@kde.org>2010-10-03 20:08:13 +0000
commit6bda72f6e9115c1bf6c58977a4e35075359eccdf (patch)
tree48ccc29cfb645da349701b2f363fa045f1621cab /modules
parent7c976ea2005da3b4f1fd3c0cc0e4391a606b7399 (diff)
downloadextra-cmake-modules-6bda72f6e9115c1bf6c58977a4e35075359eccdf.tar.gz
extra-cmake-modules-6bda72f6e9115c1bf6c58977a4e35075359eccdf.tar.bz2
-also provide the version number with the dots, in LCMS_DOT_VERSION
Alex CCMAIL: <cgiboudeaux@gmail.com> svn path=/trunk/KDE/kdelibs/; revision=1182213
Diffstat (limited to 'modules')
-rw-r--r--modules/FindLCMS.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/modules/FindLCMS.cmake b/modules/FindLCMS.cmake
index 36cba1d2..abc9ece3 100644
--- a/modules/FindLCMS.cmake
+++ b/modules/FindLCMS.cmake
@@ -3,11 +3,12 @@
# This module defines
# LCMS_INCLUDE_DIR, where to find lcms.h
# LCMS_LIBRARIES, the libraries needed to use LCMS.
-# LCMS_VERSION, The value of LCMS_VERSION defined in lcms.h
+# LCMS_DOT_VERSION, The version number of the LCMS library, e.g. "1.19"
+# LCMS_VERSION, Similar to LCMS_DOT_VERSION, but without the dots, e.g. "119"
# LCMS_FOUND, If false, do not try to use LCMS.
#
# The minimum required version of LCMS can be specified using the
-# standard syntax, e.g. find_package(LCMS 1.1)
+# standard syntax, e.g. find_package(LCMS 1.10)
# Copyright (c) 2008, Adrian Page, <adrian@pagenet.plus.com>
# Copyright (c) 2009, Cyrille Berger, <cberger@cberger.net>
@@ -48,11 +49,12 @@ if(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION)
string(SUBSTRING ${_LCMS_VERSION} 1 2 LCMS_MINOR_VERSION)
endif(LCMS_VERSION_MATCH)
set(LCMS_VERSION "${LCMS_MAJOR_VERSION}${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms" FORCE)
+ set(LCMS_DOT_VERSION "${LCMS_MAJOR_VERSION}.${LCMS_MINOR_VERSION}" CACHE STRING "Version number of lcms split into components" FORCE)
endif(LCMS_INCLUDE_DIR AND NOT LCMS_VERSION)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LCMS REQUIRED_VARS LCMS_LIBRARIES LCMS_INCLUDE_DIR
- VERSION_VAR LCMS_VERSION )
+ VERSION_VAR LCMS_DOT_VERSION )
mark_as_advanced(LCMS_INCLUDE_DIR LCMS_LIBRARIES LCMS_VERSION)