aboutsummaryrefslogtreecommitdiff
path: root/modules/FindSharedDesktopOntologies.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2010-01-07 18:39:34 +0000
committerAlexander Neundorf <neundorf@kde.org>2010-01-07 18:39:34 +0000
commit1c966e86fcb333b72f65588a0ded697889bf378b (patch)
tree8746d1a6e032460f09930f428722bd9116b0ed51 /modules/FindSharedDesktopOntologies.cmake
parentb22257ac18459a4dfbd6a42e0ac14472cd8f13ea (diff)
downloadextra-cmake-modules-1c966e86fcb333b72f65588a0ded697889bf378b.tar.gz
extra-cmake-modules-1c966e86fcb333b72f65588a0ded697889bf378b.tar.bz2
-make cmake 2.6.2 find SDO 0.2
This didn't work since SDO 0.2 installs its files into share/cmake/SDO/, which is supported by cmake >= 2.6.3, but not by 2.6.2, which KDE requires. It would be nice if SDO would install it into share/SDO/ or share/SDO/cmake, then it would be found automatically by cmake 2.6.2 and also 2.6.3 and all newer versions. Alex CCMAIL: kde-buildsystem@kde.org CCMAIL: mueller@kde.org CCMAIL: release-team@kde.org CCMAIL: trueg@kde.org CCMAIL: kde-packagers@kde.org svn path=/trunk/KDE/kdelibs/; revision=1071218
Diffstat (limited to 'modules/FindSharedDesktopOntologies.cmake')
-rw-r--r--modules/FindSharedDesktopOntologies.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake
index 2bca1df3..eecd608a 100644
--- a/modules/FindSharedDesktopOntologies.cmake
+++ b/modules/FindSharedDesktopOntologies.cmake
@@ -21,7 +21,14 @@
# First try the SharedDesktopOntologiesConfig.cmake from shared-desktop-ontologies 0.2 and newer
-find_package(SharedDesktopOntologies ${SharedDesktopOntologies_FIND_VERSION} QUIET NO_MODULE)
+
+# This is to make it work with cmake 2.6.2, since SDO 0.2 installs its config file into
+# the 2.6.3 compatible location only ( share/cmake/SDO/ instead share/SDO/[cmake/] )
+if( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.6.3")
+ find_path(_SDO_CONFIG_DIR SharedDesktopOntologiesConfig.cmake PATH_SUFFIXES share/cmake/SharedDesktopOntologies/ )
+endif( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_LESS "2.6.3")
+
+find_package(SharedDesktopOntologies ${SharedDesktopOntologies_FIND_VERSION} QUIET NO_MODULE HINTS "${_SDO_CONFIG_DIR}" )
if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR)
mark_as_advanced(SHAREDDESKTOPONTOLOGIES_ROOT_DIR)