aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2008-12-14 22:45:39 +0000
committerAlexander Neundorf <neundorf@kde.org>2008-12-14 22:45:39 +0000
commit8a43bd02a65fb884553e5e87f09923a591dbd55b (patch)
treecc264ddbb7e270c9b1c751d74244f5b8abbd2ae2 /modules
parentbbe1d875e27f9d87fefa985d6a819cf931031be9 (diff)
downloadextra-cmake-modules-8a43bd02a65fb884553e5e87f09923a591dbd55b.tar.gz
extra-cmake-modules-8a43bd02a65fb884553e5e87f09923a591dbd55b.tar.bz2
-optionally support a version number for searching kdepimlibs
-fix comment, filename is <package>ConfigVersion.cmake -fix logic in Version template file, it was the wrong way Alex svn path=/trunk/KDE/kdelibs/; revision=896993
Diffstat (limited to 'modules')
-rw-r--r--modules/FindKDE4Internal.cmake2
-rw-r--r--modules/FindKdepimLibs.cmake2
-rw-r--r--modules/kde4BasicFindPackageVersion.cmake.in11
3 files changed, 9 insertions, 6 deletions
diff --git a/modules/FindKDE4Internal.cmake b/modules/FindKDE4Internal.cmake
index 386586aa..ba03f65f 100644
--- a/modules/FindKDE4Internal.cmake
+++ b/modules/FindKDE4Internal.cmake
@@ -135,7 +135,7 @@
# for Qt Designer plugins.
#
# KDE4_WRITE_BASIC_CMAKE_VERSION_FILE( _filename _major _minor _patch)
-# Writes a file for use as <package>Version.cmake file to <_filename>.
+# Writes a file for use as <package>ConfigVersion.cmake file to <_filename>.
# See the documentation of FIND_PACKAGE() for details on this.
# _filename is the output filename, it should be in the build tree.
# _major is the major version number of the project to be installed
diff --git a/modules/FindKdepimLibs.cmake b/modules/FindKdepimLibs.cmake
index 29741328..603a27f2 100644
--- a/modules/FindKdepimLibs.cmake
+++ b/modules/FindKdepimLibs.cmake
@@ -64,7 +64,7 @@
# See kdepimlibs/CMakeLists.txt and kdepimlibs/KdepimLibsConfig.cmake.in
# for details. Alex
set(_KdepimLibs_FIND_QUIETLY ${KdepimLibs_FIND_QUIETLY})
-find_package(KdepimLibs QUIET NO_MODULE PATHS ${KDE4_LIB_DIR}/KdepimLibs/cmake )
+find_package(KdepimLibs ${KdepimLibs_FIND_VERSION} QUIET NO_MODULE PATHS ${KDE4_LIB_DIR}/KdepimLibs/cmake )
set(KdepimLibs_FIND_QUIETLY ${_KdepimLibs_FIND_QUIETLY})
include(FindPackageHandleStandardArgs)
diff --git a/modules/kde4BasicFindPackageVersion.cmake.in b/modules/kde4BasicFindPackageVersion.cmake.in
index a347e15f..4760f301 100644
--- a/modules/kde4BasicFindPackageVersion.cmake.in
+++ b/modules/kde4BasicFindPackageVersion.cmake.in
@@ -19,9 +19,12 @@
set(PACKAGE_VERSION @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@)
-if(NOT ${PACKAGE_FIND_VERSION} VERSION_LESS ${PACKAGE_VERSION} )
+if(${PACKAGE_VERSION} LESS ${PACKAGE_FIND_VERSION} )
+ set(PACKAGE_VERSION_COMPATIBLE FALSE)
+else(${PACKAGE_VERSION} LESS ${PACKAGE_FIND_VERSION} )
set(PACKAGE_VERSION_COMPATIBLE TRUE)
- if( ${PACKAGE_FIND_VERSION} STREQUAL ${PACKAGE_VERSION})
+ if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
set(PACKAGE_VERSION_EXACT TRUE)
- endif( ${PACKAGE_FIND_VERSION} STREQUAL ${PACKAGE_VERSION})
-endif(NOT ${PACKAGE_FIND_VERSION} VERSION_LESS ${PACKAGE_VERSION} )
+ endif( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}")
+endif(${PACKAGE_VERSION} LESS ${PACKAGE_FIND_VERSION} )
+