Le mardi 26 octobre 2010 10:51:07, vous avez écrit :
> Hey,
> 
> SOPRANO_MIN_VERSION isn't correctly check in FindSoprano.cmake
> by find_package_handle_standard_args, causing build failure with the
> lastest soprano (2.5.2). In this case, nepomuk is built anyway and
> shouldn't. The problem is due to find_package_handle_standard_args() which
> should have the "VERSION_ARG" argument in order to check if at least
> SOPRANO_MIN_VERSION is found, otherwise Soprano is converted to uppercase
> and SOPRANO_FOUND is set to TRUE, and  necessarily Soprano_FOUND too.
> Also in FindNepomuk.cmake find_package() should check for
> SOPRANO_MIN_VERSION imho (however I'm not 100% sure about that, because
> it'll be installed on the system... any other ideas ?)
> 
> See a patch in attachment, feel free to comment it.
> 
> Regards,
> Romain

Arff noob mistake , this is the "second mode" for 
find_package_handle_standard_args(), so we've to use REQUIRED_VARS otherwises 
it fails randomly.

see the correct patch in attachment
Regards,
Romain
Index: cmake/modules/FindSoprano.cmake
===================================================================
--- cmake/modules/FindSoprano.cmake	(révision 1189918)
+++ cmake/modules/FindSoprano.cmake	(copie de travail)
@@ -209,9 +209,8 @@
 endif(SOPRANO_INCLUDE_DIR)
 
 include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(Soprano DEFAULT_MSG 
-                                  SOPRANO_INCLUDE_DIR SOPRANO_LIBRARIES
-                                  ${_SOPRANO_REQUIRED_COMPONENTS_RESULTS} )
+find_package_handle_standard_args(Soprano REQUIRED_VARS
+                                  SOPRANO_INCLUDE_DIR SOPRANO_LIBRARIES ${_SOPRANO_REQUIRED_COMPONENTS_RESULTS} VERSION_VAR SOPRANO_MIN_VERSION)
 
 # for compatibility:
 set(Soprano_FOUND ${SOPRANO_FOUND})
Index: cmake/modules/FindNepomuk.cmake
===================================================================
--- cmake/modules/FindNepomuk.cmake	(révision 1189918)
+++ cmake/modules/FindNepomuk.cmake	(copie de travail)
@@ -17,7 +17,7 @@
 
 
 if (NOT DEFINED Soprano_FOUND)
-  find_package(Soprano)
+  find_package(Soprano ${SOPRANO_MIN_VERSION})
   include(MacroLogFeature)
   macro_log_feature(Soprano_FOUND "Soprano" "Semantic Desktop Storing" "http://soprano.sourceforge.net/"; FALSE "" "Soprano is needed for Nepomuk")
 endif (NOT DEFINED Soprano_FOUND)
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(révision 1189918)
+++ CMakeLists.txt	(copie de travail)
@@ -101,8 +101,10 @@
 set(SOPRANO_MIN_VERSION "2.5.60")
 macro_optional_find_package(Soprano ${SOPRANO_MIN_VERSION} COMPONENTS PLUGIN_RAPTORPARSER PLUGIN_REDLANDBACKEND)
 macro_log_feature(SOPRANO_FOUND "Soprano" "Semantic Desktop Storing" "http://soprano.sourceforge.net"; FALSE "${SOPRANO_MIN_VERSION}" "Provide metadata support (for semantic desktop).")
-macro_log_feature(SOPRANO_PLUGIN_RAPTORPARSER_FOUND "Soprano Raptor Parser" "RDF parser plugin for Soprano" "http://soprano.sourceforge.net"; FALSE "" "The Soprano raptor parser plugin is required to build the Nepomuk semantic desktop system.")
-macro_log_feature(SOPRANO_PLUGIN_REDLANDBACKEND_FOUND "Soprano Redland Backend" "Redland storage backend for Soprano" "http://soprano.sourceforge.net"; FALSE "" "The Soprano redland backend is required to build the Nepomuk semantic desktop system.")
+if (SOPRANO_FOUND)
+   macro_log_feature(SOPRANO_PLUGIN_RAPTORPARSER_FOUND "Soprano Raptor Parser" "RDF parser plugin for Soprano" "http://soprano.sourceforge.net"; FALSE "" "The Soprano raptor parser plugin is required to build the Nepomuk semantic desktop system.")
+   macro_log_feature(SOPRANO_PLUGIN_REDLANDBACKEND_FOUND "Soprano Redland Backend" "Redland storage backend for Soprano" "http://soprano.sourceforge.net"; FALSE "" "The Soprano redland backend is required to build the Nepomuk semantic desktop system.")
+endif(SOPRANO_FOUND)
 
 set(SHAREDDESKTOPONTOLOGIES_MIN_VERSION 0.5)
 macro_optional_find_package(SharedDesktopOntologies ${SHAREDDESKTOPONTOLOGIES_MIN_VERSION})
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to