Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt	(revision 1054513)
+++ CMakeLists.txt	(working copy)
@@ -96,7 +96,7 @@
 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.")
 
 macro_optional_find_package(SharedDesktopOntologies)
-macro_log_feature(DESKTOP_ONTOLOGIES_FOUND "Shared desktop ontologies" "Desktop ontologies" "http://oscaf.sourceforge.net" FALSE "" "Ontologies necessary for the Nepomuk semantic desktop.")
+macro_log_feature(SHAREDDESKTOPONTOLOGIES_FOUND "Shared desktop ontologies" "Desktop ontologies" "http://oscaf.sourceforge.net" FALSE "" "Ontologies necessary for the Nepomuk semantic desktop.")
 
 macro_optional_find_package(QCA2)
 macro_log_feature(QCA2_FOUND "QCA2" "Qt Cryptographic Architecture" "http://delta.affinix.com/qca" FALSE "2.0.0" "Needed for the plasma remote widgets functionality.")
@@ -227,10 +227,10 @@
 
 # Actually nepomuk is not optional, without it other KDE modules don't build,
 # so this must be fixed. Alex
-if(DESKTOP_ONTOLOGIES_FOUND)
+if(Soprano_FOUND AND SHAREDDESKTOPONTOLOGIES_FOUND)
   set(HAVE_NEPOMUK true)
   add_subdirectory(nepomuk)
-endif(DESKTOP_ONTOLOGIES_FOUND)
+endif(Soprano_FOUND AND SHAREDDESKTOPONTOLOGIES_FOUND)
 
 ################# list the subdirectories #################
 
Index: cmake/modules/FindSharedDesktopOntologies.cmake
===================================================================
--- cmake/modules/FindSharedDesktopOntologies.cmake	(revision 1054555)
+++ cmake/modules/FindSharedDesktopOntologies.cmake	(working copy)
@@ -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, <trueg@kde.org>
+#
+# 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)
Index: cmake/modules/FindNepomuk.cmake
===================================================================
--- cmake/modules/FindNepomuk.cmake	(revision 1054555)
+++ cmake/modules/FindNepomuk.cmake	(working copy)
@@ -19,14 +19,14 @@
 if (NOT DEFINED Soprano_FOUND)
   find_package(Soprano)
   include(MacroLogFeature)
-  macro_log_feature(Soprano_FOUND "Soprano" "Semantic Desktop Storing" "" FALSE "" "Soprano is needed for Nepomuk")
+  macro_log_feature(Soprano_FOUND "Soprano" "Semantic Desktop Storing" "" TRUE "" "Soprano is needed for Nepomuk")
 endif (NOT DEFINED Soprano_FOUND)
 
-if (NOT DEFINED DESKTOP_ONTOLOGIES_FOUND)
+if (NOT DEFINED SHAREDDESKTOPONTOLOGIES_FOUND)
   find_package(SharedDesktopOntologies)
   include(MacroLogFeature)
-  macro_log_feature(DESKTOP_ONTOLOGIES_FOUND "Shared desktop ontologies" "Desktop ontologies" "http://oscaf.sourceforge.net" FALSE "" "Ontologies necessary for the Nepomuk semantic desktop.")
-endif (NOT DEFINED DESKTOP_ONTOLOGIES_FOUND)
+  macro_log_feature(SHAREDDESKTOPONTOLOGIES_FOUND "Shared desktop ontologies" "Desktop ontologies" "http://oscaf.sourceforge.net" TRUE "" "Ontologies necessary for the Nepomuk semantic desktop.")
+endif (NOT DEFINED SHAREDDESKTOPONTOLOGIES_FOUND)
 
 # Check for the following stuff independent from whether soprano has been found
 # or not. This will give a better error message at the end.
@@ -61,7 +61,7 @@
 # easier for the user to see what was missing:
 find_package_handle_standard_args(Nepomuk  DEFAULT_MSG 
                                   NEPOMUK_LIBRARIES NEPOMUK_INCLUDE_DIR
-                                  Soprano_FOUND SOPRANO_PLUGIN_RAPTORPARSER_FOUND SOPRANO_PLUGIN_REDLANDBACKEND_FOUND DESKTOP_ONTOLOGIES_FOUND
+                                  Soprano_FOUND SOPRANO_PLUGIN_RAPTORPARSER_FOUND SOPRANO_PLUGIN_REDLANDBACKEND_FOUND SHAREDDESKTOPONTOLOGIES_FOUND
                                   )
 
 #to retain backward compatibility
Index: nepomuk/core/CMakeLists.txt
===================================================================
--- nepomuk/core/CMakeLists.txt	(revision 1054513)
+++ nepomuk/core/CMakeLists.txt	(working copy)
@@ -52,9 +52,9 @@
   graphwrapper.cpp
 )
 
-soprano_add_ontology(nepomuk_LIB_SRCS "${DESKTOP_ONTOLOGIES_DIR}/nie/nie.trig" "NIE" "Nepomuk::Vocabulary" "trig")
-soprano_add_ontology(nepomuk_LIB_SRCS "${DESKTOP_ONTOLOGIES_DIR}/nie/nfo.trig" "NFO" "Nepomuk::Vocabulary" "trig")
-soprano_add_ontology(nepomuk_LIB_SRCS "${DESKTOP_ONTOLOGIES_DIR}/pimo/pimo.trig" "PIMO" "Nepomuk::Vocabulary" "trig")
+soprano_add_ontology(nepomuk_LIB_SRCS "${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nie.trig" "NIE" "Nepomuk::Vocabulary" "trig")
+soprano_add_ontology(nepomuk_LIB_SRCS "${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nfo.trig" "NFO" "Nepomuk::Vocabulary" "trig")
+soprano_add_ontology(nepomuk_LIB_SRCS "${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/pimo/pimo.trig" "PIMO" "Nepomuk::Vocabulary" "trig")
 
 kde4_add_library(nepomuk SHARED ${nepomuk_LIB_SRCS})
 
Index: nepomuk/query/CMakeLists.txt
===================================================================
--- nepomuk/query/CMakeLists.txt	(revision 1054513)
+++ nepomuk/query/CMakeLists.txt	(working copy)
@@ -33,7 +33,7 @@
 )
 
 include(SopranoAddOntology)
-soprano_add_ontology(nepomukquery_SRC "${DESKTOP_ONTOLOGIES_DIR}/nie/nie.trig" "NIE" "Nepomuk::Vocabulary" "trig")
+soprano_add_ontology(nepomukquery_SRC "${SHAREDDESKTOPONTOLOGIES_ROOT_DIR}/nie/nie.trig" "NIE" "Nepomuk::Vocabulary" "trig")
 
 set_source_files_properties(
   org.kde.nepomuk.QueryService.xml
