KDE/kdelibs/cmake/modules

Alexander Neundorf neundorf at kde.org
Thu Jan 7 19:39:37 CET 2010


SVN commit 1071218 by neundorf:

-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 at kde.org
CCMAIL: mueller at kde.org
CCMAIL: release-team at kde.org
CCMAIL: trueg at kde.org
CCMAIL: kde-packagers at kde.org



 M  +8 -1      FindSharedDesktopOntologies.cmake  


--- trunk/KDE/kdelibs/cmake/modules/FindSharedDesktopOntologies.cmake #1071217:1071218
@@ -21,8 +21,15 @@
 
 
 # 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)
 endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR)


More information about the release-team mailing list