From 7ae2155f81e026d49740e844dd6327e3f8a901fe Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Wed, 25 Nov 2009 20:42:54 +0000 Subject: Added macro to find the new shared-desktop-ontologies package svn path=/trunk/KDE/kdelibs/; revision=1054294 --- modules/FindSharedDesktopOntologies.cmake | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 modules/FindSharedDesktopOntologies.cmake (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake new file mode 100644 index 00000000..c0ebb37d --- /dev/null +++ b/modules/FindSharedDesktopOntologies.cmake @@ -0,0 +1,36 @@ +# - Try to find shared-desktop-ontologies +# Once done this will define +# +# DESKTOP_ONTOLOGIES_FOUND - system has shared-desktop-ontologies +# DESKTOP_ONTOLOGIES_DIR - Folder where the ontologies are stored +# DESKTOP_ONTOLOGIES_VERSION - version number of shared-desktop-ontologies + +# Copyright (c) 2009, Sebastian Trueg, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +IF (DESKTOP_ONTOLOGIES_DIR) + # in cache already + SET(SharedDesktopOntologies_FIND_QUIETLY TRUE) +ENDIF (DESKTOP_ONTOLOGIES_DIR) + +IF (NOT WIN32) + # use pkg-config to get the directories and then use these values + # in the FIND_PATH() and FIND_LIBRARY() calls + find_package(PkgConfig) + PKG_SEARCH_MODULE( DESKTOP_ONTOLOGIES shared-desktop-ontologies ) + set(DESKTOP_ONTOLOGIES_DIR ${DESKTOP_ONTOLOGIES_PREFIX}/share/ontology) +ENDIF (NOT WIN32) + +IF (DESKTOP_ONTOLOGIES_FOUND) + IF (NOT SharedDesktopOntologies_FIND_QUIETLY) + MESSAGE(STATUS "Found SharedDesktopOntologies ${DESKTOP_ONTOLOGIES_VERSION}: ${DESKTOP_ONTOLOGIES_DIR}") + ENDIF (NOT SharedDesktopOntologies_FIND_QUIETLY) +ELSE (DESKTOP_ONTOLOGIES_FOUND) + IF (SharedDesktopOntologies_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "Could NOT find SharedDesktopOntologies, check FindPkgConfig output above!") + ENDIF (SharedDesktopOntologies_FIND_REQUIRED) +ENDIF (DESKTOP_ONTOLOGIES_FOUND) + +MARK_AS_ADVANCED(DESKTOP_ONTOLOGIES_DIR) -- cgit v1.2.1 From e9a85eb38858566704041b761a5b8bfa3222e0e3 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Wed, 25 Nov 2009 23:47:30 +0000 Subject: Revert the new cmake module committed without any review or announcement and which was in a broken state. This has the effect that the condition for building nepomuk is now never true (instead of sometimes), but I have the impression that for successfully building all of KDE nepomuk is always required, since the nepomuk/trig parsing is also used e.g. in kdepim and I think also in kdenetwork. So the behaviour was already wrong, and now it is more exposed. This should help getting it fixed. Also, this commit makes explicit that soprano with redland backend and raptorparser are in fact required for building KDE since last week. Alex CCMAIL: trueg@kde.org CCMAIL: kde-buildsystem@kde.org CCMAIL: kde-core-devel@kde.org svn path=/trunk/KDE/kdelibs/; revision=1054396 --- modules/FindSharedDesktopOntologies.cmake | 38 +++---------------------------- 1 file changed, 3 insertions(+), 35 deletions(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake index c0ebb37d..9e9f4278 100644 --- a/modules/FindSharedDesktopOntologies.cmake +++ b/modules/FindSharedDesktopOntologies.cmake @@ -1,36 +1,4 @@ -# - Try to find shared-desktop-ontologies -# Once done this will define -# -# DESKTOP_ONTOLOGIES_FOUND - system has shared-desktop-ontologies -# DESKTOP_ONTOLOGIES_DIR - Folder where the ontologies are stored -# DESKTOP_ONTOLOGIES_VERSION - version number of shared-desktop-ontologies +# This module was committed without any review or announcement and in a not acceptable state, so disable it for now. Alex +message(STATUS "FindSharedDesktopOntologies.cmake is just a placeholder until a reviewed module is committed") -# Copyright (c) 2009, Sebastian Trueg, -# -# Redistribution and use is allowed according to the terms of the BSD license. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -IF (DESKTOP_ONTOLOGIES_DIR) - # in cache already - SET(SharedDesktopOntologies_FIND_QUIETLY TRUE) -ENDIF (DESKTOP_ONTOLOGIES_DIR) - -IF (NOT WIN32) - # use pkg-config to get the directories and then use these values - # in the FIND_PATH() and FIND_LIBRARY() calls - find_package(PkgConfig) - PKG_SEARCH_MODULE( DESKTOP_ONTOLOGIES shared-desktop-ontologies ) - set(DESKTOP_ONTOLOGIES_DIR ${DESKTOP_ONTOLOGIES_PREFIX}/share/ontology) -ENDIF (NOT WIN32) - -IF (DESKTOP_ONTOLOGIES_FOUND) - IF (NOT SharedDesktopOntologies_FIND_QUIETLY) - MESSAGE(STATUS "Found SharedDesktopOntologies ${DESKTOP_ONTOLOGIES_VERSION}: ${DESKTOP_ONTOLOGIES_DIR}") - ENDIF (NOT SharedDesktopOntologies_FIND_QUIETLY) -ELSE (DESKTOP_ONTOLOGIES_FOUND) - IF (SharedDesktopOntologies_FIND_REQUIRED) - MESSAGE(FATAL_ERROR "Could NOT find SharedDesktopOntologies, check FindPkgConfig output above!") - ENDIF (SharedDesktopOntologies_FIND_REQUIRED) -ENDIF (DESKTOP_ONTOLOGIES_FOUND) - -MARK_AS_ADVANCED(DESKTOP_ONTOLOGIES_DIR) +set(DESKTOP_ONTOLOGIES_DIR "") -- cgit v1.2.1 From 3ebe3e49632c59e189b309379ab5928029b3355a Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Fri, 27 Nov 2009 09:25:47 +0000 Subject: Fixed Nepomuk build system including the shared ontologies. Approved by Andreas Pakulat. svn path=/trunk/KDE/kdelibs/; revision=1054973 --- modules/FindSharedDesktopOntologies.cmake | 39 ++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake index 9e9f4278..f102126f 100644 --- a/modules/FindSharedDesktopOntologies.cmake +++ b/modules/FindSharedDesktopOntologies.cmake @@ -1,4 +1,37 @@ -# This module was committed without any review or announcement and in a not acceptable state, so disable it for now. Alex -message(STATUS "FindSharedDesktopOntologies.cmake is just a placeholder until a reviewed module is committed") +# - Try to find shared-desktop-ontologies +# The shared-desktop-ontologies package is a direct dependancy of the Nepomuk +# semantic desktop system and provides all necessary ontology files like +# RDF, RDFS, NRL, or NIE. +# +# The package is created by the OSCAF project (http://oscaf.sourceforge.net). +# +# Once done this will define +# +# SHAREDDESKTOPONTOLOGIES_FOUND - system has shared-desktop-ontologies +# SHAREDDESKTOPONTOLOGIES_ROOT_DIR - Folder where the ontologies are stored +# -set(DESKTOP_ONTOLOGIES_DIR "") +# Copyright (c) 2009, Sebastian Trueg, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) + # in cache already + set(SHAREDDESKTOPONTOLOGIES_FIND_QUIETLY TRUE) +endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) + +find_path (SHAREDDESKTOPONTOLOGIES_ROOT_DIR + nie/nie.trig + PATHS + /usr/share + /usr/local/share + ${SHARE_INSTALL_PREFIX} + ENV XDG_DATA_DIRS + PATH_SUFFIXES ontology +) + +mark_as_advanced(SHAREDDESKTOPONTOLOGIES_ROOT_DIR) + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(SharedDesktopOntologies DEFAULT_MSG SHAREDDESKTOPONTOLOGIES_ROOT_DIR) -- cgit v1.2.1 From c8ff15f718ab374ac2f30721256b42ee9c73f17f Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Fri, 27 Nov 2009 11:32:53 +0000 Subject: Also find shared-desktop-ontologies in CMAKE_PREFIX_PATH svn path=/trunk/KDE/kdelibs/; revision=1055125 --- modules/FindSharedDesktopOntologies.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake index f102126f..6b3cabe8 100644 --- a/modules/FindSharedDesktopOntologies.cmake +++ b/modules/FindSharedDesktopOntologies.cmake @@ -21,6 +21,7 @@ if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) set(SHAREDDESKTOPONTOLOGIES_FIND_QUIETLY TRUE) endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) +# Look in the standard dirs find_path (SHAREDDESKTOPONTOLOGIES_ROOT_DIR nie/nie.trig PATHS @@ -28,8 +29,12 @@ find_path (SHAREDDESKTOPONTOLOGIES_ROOT_DIR /usr/local/share ${SHARE_INSTALL_PREFIX} ENV XDG_DATA_DIRS - PATH_SUFFIXES ontology -) + PATH_SUFFIXES ontology) + +# Look in CMAKE_PREFIX_PATH +find_path(SHAREDDESKTOPONTOLOGIES_ROOT_DIR + nie/nie.trig + PATH_SUFFIXES share/ontology) mark_as_advanced(SHAREDDESKTOPONTOLOGIES_ROOT_DIR) -- cgit v1.2.1 From f9eb85764ac652b8afba04e363c67128a861a7e4 Mon Sep 17 00:00:00 2001 From: Sebastian Trueg Date: Sun, 29 Nov 2009 21:27:26 +0000 Subject: Support upcoming 0.2 version of the shared-desktop-ontologies which will bring a cmake config file svn path=/trunk/KDE/kdelibs/; revision=1056325 --- modules/FindSharedDesktopOntologies.cmake | 38 +++++++++++++++++++------------ 1 file changed, 23 insertions(+), 15 deletions(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake index 6b3cabe8..073ca08f 100644 --- a/modules/FindSharedDesktopOntologies.cmake +++ b/modules/FindSharedDesktopOntologies.cmake @@ -7,8 +7,11 @@ # # Once done this will define # -# SHAREDDESKTOPONTOLOGIES_FOUND - system has shared-desktop-ontologies -# SHAREDDESKTOPONTOLOGIES_ROOT_DIR - Folder where the ontologies are stored +# SHAREDDESKTOPONTOLOGIES_FOUND - system has shared-desktop-ontologies +# SHAREDDESKTOPONTOLOGIES_ROOT_DIR - Folder where the ontologies are stored +# SHAREDDESKTOPONTOLOGIES_VERSION_MAJOR - The major version number, i.e. '1' in '1.2' +# SHAREDDESKTOPONTOLOGIES_VERSION_MINOR - The minor version number, i.e. '2' in '1.2' +# SHAREDDESKTOPONTOLOGIES_VERSION - The complete version string, i.e. '1.2' # # Copyright (c) 2009, Sebastian Trueg, @@ -21,20 +24,25 @@ if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) set(SHAREDDESKTOPONTOLOGIES_FIND_QUIETLY TRUE) endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) -# Look in the standard dirs -find_path (SHAREDDESKTOPONTOLOGIES_ROOT_DIR - nie/nie.trig - PATHS - /usr/share - /usr/local/share - ${SHARE_INSTALL_PREFIX} - ENV XDG_DATA_DIRS - PATH_SUFFIXES ontology) +# First try the SharedDesktopOntologiesConfig.cmake from shared-desktop-ontologies 0.2 and newer +find_package(SharedDesktopOntologies ${SharedDesktopOntologies_FIND_VERSION} QUIET NO_MODULE) -# Look in CMAKE_PREFIX_PATH -find_path(SHAREDDESKTOPONTOLOGIES_ROOT_DIR - nie/nie.trig - PATH_SUFFIXES share/ontology) +if (NOT SHAREDDESKTOPONTOLOGIES_ROOT_DIR) + # Look in the standard dirs + find_path (SHAREDDESKTOPONTOLOGIES_ROOT_DIR + nie/nie.trig + PATHS + /usr/share + /usr/local/share + ${SHARE_INSTALL_PREFIX} + ENV XDG_DATA_DIRS + PATH_SUFFIXES ontology) + + # Look in CMAKE_PREFIX_PATH + find_path(SHAREDDESKTOPONTOLOGIES_ROOT_DIR + nie/nie.trig + PATH_SUFFIXES share/ontology) +endif (NOT SHAREDDESKTOPONTOLOGIES_ROOT_DIR) mark_as_advanced(SHAREDDESKTOPONTOLOGIES_ROOT_DIR) -- cgit v1.2.1 From 14224f75231147cb4dd434d409e7ddca76c75040 Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Mon, 30 Nov 2009 19:31:25 +0000 Subject: -find_package_handle_standard_args() already takes care of not printing the same message twice, so it's not necessary to set the QUIETLY -multiple suffixes can be listed after PATH_SUFFIXES, so it's not necessary to have two find_path() calls -/usr and /usr/local are already part of CMAKE_SYSTEM_PREFIX_PATH, so it's not necessary to set /usr/share and /usr/local/share explicitely (see CMake Modules/Platform/UnixPath.cmake) Alex CCMAIL: trueg@kde.org svn path=/trunk/KDE/kdelibs/; revision=1056761 --- modules/FindSharedDesktopOntologies.cmake | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake index 073ca08f..c5b78fc9 100644 --- a/modules/FindSharedDesktopOntologies.cmake +++ b/modules/FindSharedDesktopOntologies.cmake @@ -19,10 +19,6 @@ # Redistribution and use is allowed according to the terms of the BSD license. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. -if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) - # in cache already - set(SHAREDDESKTOPONTOLOGIES_FIND_QUIETLY TRUE) -endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) # First try the SharedDesktopOntologiesConfig.cmake from shared-desktop-ontologies 0.2 and newer find_package(SharedDesktopOntologies ${SharedDesktopOntologies_FIND_VERSION} QUIET NO_MODULE) @@ -32,16 +28,10 @@ if (NOT SHAREDDESKTOPONTOLOGIES_ROOT_DIR) find_path (SHAREDDESKTOPONTOLOGIES_ROOT_DIR nie/nie.trig PATHS - /usr/share - /usr/local/share ${SHARE_INSTALL_PREFIX} ENV XDG_DATA_DIRS - PATH_SUFFIXES ontology) + PATH_SUFFIXES ontology share/ontology ) - # Look in CMAKE_PREFIX_PATH - find_path(SHAREDDESKTOPONTOLOGIES_ROOT_DIR - nie/nie.trig - PATH_SUFFIXES share/ontology) endif (NOT SHAREDDESKTOPONTOLOGIES_ROOT_DIR) mark_as_advanced(SHAREDDESKTOPONTOLOGIES_ROOT_DIR) -- cgit v1.2.1 From ad92bad30f078347776aabe9378c9069e64424a1 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Sat, 26 Dec 2009 16:35:22 +0000 Subject: Fix FindSharedDesktopOntologies: Previously, if the required version wasn't found (mismatching _VERSION), this cmake file was looking for *any* version and set SHAREDDESKTOPONTOLOGIES_FOUND to true. This also means kdelibs will now require SDO 0.2. ack'ed by Alex. svn path=/trunk/KDE/kdelibs/; revision=1066282 --- modules/FindSharedDesktopOntologies.cmake | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake index c5b78fc9..2bca1df3 100644 --- a/modules/FindSharedDesktopOntologies.cmake +++ b/modules/FindSharedDesktopOntologies.cmake @@ -23,18 +23,9 @@ # First try the SharedDesktopOntologiesConfig.cmake from shared-desktop-ontologies 0.2 and newer find_package(SharedDesktopOntologies ${SharedDesktopOntologies_FIND_VERSION} QUIET NO_MODULE) -if (NOT SHAREDDESKTOPONTOLOGIES_ROOT_DIR) - # Look in the standard dirs - find_path (SHAREDDESKTOPONTOLOGIES_ROOT_DIR - nie/nie.trig - PATHS - ${SHARE_INSTALL_PREFIX} - ENV XDG_DATA_DIRS - PATH_SUFFIXES ontology share/ontology ) - -endif (NOT SHAREDDESKTOPONTOLOGIES_ROOT_DIR) - -mark_as_advanced(SHAREDDESKTOPONTOLOGIES_ROOT_DIR) +if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) + mark_as_advanced(SHAREDDESKTOPONTOLOGIES_ROOT_DIR) +endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) include(FindPackageHandleStandardArgs) find_package_handle_standard_args(SharedDesktopOntologies DEFAULT_MSG SHAREDDESKTOPONTOLOGIES_ROOT_DIR) -- cgit v1.2.1 From 1c966e86fcb333b72f65588a0ded697889bf378b Mon Sep 17 00:00:00 2001 From: Alexander Neundorf Date: Thu, 7 Jan 2010 18:39:34 +0000 Subject: -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 --- modules/FindSharedDesktopOntologies.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') 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) -- cgit v1.2.1 From 04c6f67b0ebd9490fec82e330a704a616c28e536 Mon Sep 17 00:00:00 2001 From: David Faure Date: Mon, 15 Nov 2010 22:32:17 +0000 Subject: Forwardport -c1197454: Actually honour the minimum version required for SDO. Thanks to Romain Perier for investigating the similar issue in FindSoprano.cmake: find_package_handle_standard_args() has 2 modes, and only the second mode (REQUIRED_VARS ... VERSION_VAR ...) checks for the version number. svn path=/trunk/KDE/kdelibs/; revision=1197455 --- modules/FindSharedDesktopOntologies.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake index eecd608a..a384b1ba 100644 --- a/modules/FindSharedDesktopOntologies.cmake +++ b/modules/FindSharedDesktopOntologies.cmake @@ -35,4 +35,4 @@ if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SharedDesktopOntologies DEFAULT_MSG SHAREDDESKTOPONTOLOGIES_ROOT_DIR) +find_package_handle_standard_args(SharedDesktopOntologies REQUIRED_VARS SHAREDDESKTOPONTOLOGIES_ROOT_DIR VERSION_VAR SDO_MIN_VERSION) -- cgit v1.2.1 From 1a5d78694b048fc1a9f4b9f281dc0e94cf6538bb Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 17 Nov 2010 12:34:39 +0000 Subject: Fix version handling (by setting SharedDesktopOntologies_FIND_VERSION, which is what FindPackageHandleStandardArgs looks at) svn path=/trunk/KDE/kdelibs/; revision=1198106 --- modules/FindSharedDesktopOntologies.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake index a384b1ba..e2a62b67 100644 --- a/modules/FindSharedDesktopOntologies.cmake +++ b/modules/FindSharedDesktopOntologies.cmake @@ -28,6 +28,10 @@ if( "${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSI 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") +if(NOT SharedDesktopOntologies_FIND_VERSION) + set(SharedDesktopOntologies_FIND_VERSION "${SDO_MIN_VERSION}") +endif(NOT SharedDesktopOntologies_FIND_VERSION) + find_package(SharedDesktopOntologies ${SharedDesktopOntologies_FIND_VERSION} QUIET NO_MODULE HINTS "${_SDO_CONFIG_DIR}" ) if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) @@ -35,4 +39,4 @@ if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SharedDesktopOntologies REQUIRED_VARS SHAREDDESKTOPONTOLOGIES_ROOT_DIR VERSION_VAR SDO_MIN_VERSION) +find_package_handle_standard_args(SharedDesktopOntologies REQUIRED_VARS SHAREDDESKTOPONTOLOGIES_ROOT_DIR) -- cgit v1.2.1 From 237682ace3ed8488a991d767b72609e4540c47ee Mon Sep 17 00:00:00 2001 From: David Faure Date: Wed, 17 Nov 2010 12:41:25 +0000 Subject: With this mode of FindPackageHandleStandardArgs, passing the VERSION_VAR is actually necessary for the version check to happen svn path=/trunk/KDE/kdelibs/; revision=1198107 --- modules/FindSharedDesktopOntologies.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/FindSharedDesktopOntologies.cmake') diff --git a/modules/FindSharedDesktopOntologies.cmake b/modules/FindSharedDesktopOntologies.cmake index e2a62b67..99b70362 100644 --- a/modules/FindSharedDesktopOntologies.cmake +++ b/modules/FindSharedDesktopOntologies.cmake @@ -39,4 +39,4 @@ if (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) endif (SHAREDDESKTOPONTOLOGIES_ROOT_DIR) include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(SharedDesktopOntologies REQUIRED_VARS SHAREDDESKTOPONTOLOGIES_ROOT_DIR) +find_package_handle_standard_args(SharedDesktopOntologies REQUIRED_VARS SHAREDDESKTOPONTOLOGIES_ROOT_DIR VERSION_VAR SharedDesktopOntologies_VERSION) -- cgit v1.2.1