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
- Ensure that at least SOPRANO_MIN_VERSION is found by find_package_handle_standard_args, otherwise SOPRANO_FOUND and Soprano_FOUND are set to TRUE.
- Check also the correct version for nepomuk
- Don't display plugins found if the main library doesn't match version (doesn't make sense)

Index: cmake/modules/FindSoprano.cmake
===================================================================
--- cmake/modules/FindSoprano.cmake	(révision 1189734)
+++ cmake/modules/FindSoprano.cmake	(copie de travail)
@@ -210,8 +210,7 @@
 
 include(FindPackageHandleStandardArgs)
 find_package_handle_standard_args(Soprano DEFAULT_MSG 
-                                  SOPRANO_INCLUDE_DIR SOPRANO_LIBRARIES
-                                  ${_SOPRANO_REQUIRED_COMPONENTS_RESULTS} )
+                                  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 1189734)
+++ 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 1189734)
+++ 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