[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepimlibs/cmake/modules
From:       Allen Winter <winter () kde ! org>
Date:       2010-03-09 20:58:51
Message-ID: 1268168331.499575.15456.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1101292 by winterz:

compute a variable for the major and minor version numbers.

looks like we'll need to use these values for conditional compiling since
the next libical release is probably not going to be source compatibile.
MERGE: 4.4


 M  +7 -1      FindLibical.cmake  


--- trunk/KDE/kdepimlibs/cmake/modules/FindLibical.cmake #1101291:1101292
@@ -4,8 +4,10 @@
 #  LIBICAL_INCLUDE_DIRS - the Libical include directories
 #  LIBICAL_LIBRARIES - The libraries needed to use Libical
 #  LIBICAL_VERSION = The value of ICAL_VERSION defined in ical.h
+#  LIBICAL_MAJOR_VERSION = The library major version number
+#  LIBICAL_MINOR_VERSION = The library minor version number
 
-# Copyright (c) 2008, Allen Winter <winter@kde.org>
+# Copyright (c) 2008,2010 Allen Winter <winter@kde.org>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
@@ -72,6 +74,10 @@
     message(FATAL_ERROR "Unable to compile or run the libical version detection program.")
   endif(COMPILE_RESULT AND RUN_RESULT EQUAL 1)
 
+  #compute the major and minor version numbers
+  string(REGEX REPLACE "\\..*$" "" LIBICAL_MAJOR_VERSION ${LIBICAL_VERSION})
+  string(REGEX REPLACE "^.*\\." "" LIBICAL_MINOR_VERSION ${LIBICAL_VERSION})
+
 endif(LIBICAL_INCLUDE_DIRS AND LIBICAL_LIBRARIES)
 
 include(FindPackageHandleStandardArgs)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic