Please test: modified FindNepomuk.cmake and NepomukAddOnto...cmake

Alexander Neundorf neundorf at kde.org
Thu Dec 3 23:01:32 CET 2009


Hi,

I had a closer look at the two mentioned files.
Some things where not as they should be.

The tool rcgen was searched in the macro, that's not good. This should be done 
in the FindNepomuk.file, so I moved it there.

Also, the macro modified the include path by calling include_directories(). 
This also shouldn't be done, so I removed that. 
As when using moc and similar things, the calling CMakeLists.txt has to make 
sure that CMAKE_CURRENT_BINARY_DIR is in the include dirs.

Please give it a try and adapt the users of this macro accordingly.
(they also don't have to include(NepomukAddOnot...) anymore, since this is now 
done automatically by FindNepomuk.cmake.

Please let mw know if it works.

Thanks
Alex
-------------- next part --------------
# Once done this will define
#
#  NEPOMUK_FOUND - system has Nepomuk
#  NEPOMUK_INCLUDE_DIR - the Nepomuk include directory
#  NEPOMUK_LIBRARIES - Link these to use Nepomuk
#  NEPOMUK_QUERY_LIBRARIES - Link these to use Nepomuk query
#  NEPOMUK_DEFINITIONS - Compiler switches required for using Nepomuk
#
# Nepomuk requires Soprano, so this module checks for Soprano too.
#


# Copyright (c) 2008-2009, Sebastian Trueg, <sebastian at trueg.de>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.


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")
endif (NOT DEFINED Soprano_FOUND)

if (NOT DEFINED SHAREDDESKTOPONTOLOGIES_FOUND)
  find_package(SharedDesktopOntologies)
  include(MacroLogFeature)
  macro_log_feature(SHAREDDESKTOPONTOLOGIES_FOUND "Shared desktop ontologies" "Desktop ontologies" "http://oscaf.sourceforge.net" FALSE "" "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.
find_path(NEPOMUK_INCLUDE_DIR
  NAMES
  nepomuk/global.h
  HINTS
  ${KDE4_INCLUDE_DIR}
  ${INCLUDE_INSTALL_DIR}
  )

find_library(NEPOMUK_LIBRARIES
  NAMES
  nepomuk
  HINTS
  ${KDE4_LIB_DIR}
  ${LIB_INSTALL_DIR}
  )

find_library(NEPOMUK_QUERY_LIBRARIES
  NAMES
  nepomukquery
  HINTS
  ${KDE4_LIB_DIR}
  ${LIB_INSTALL_DIR}
  )

# find our helper program (first in the install dir, then everywhere)
find_program(NEPOMUK_RCGEN nepomuk-rcgen 
             HINTS ${KDE4_BIN_INSTALL_DIR} ${BIN_INSTALL_DIR})


find_file(NEPOMUK_ADDONTOLOGYCLASSES_FILE NepomukAddOntologyClasses.cmake
          HINTS ${KDE4_DATA_INSTALL_DIR}/cmake/modules/
          PATH_SUFFIXES share/apps/cmake/modules/
         )

include("${NEPOMUK_ADDONTOLOGYCLASSES_FILE}" OPTIONAL)

mark_as_advanced(NEPOMUK_INCLUDE_DIR  NEPOMUK_LIBRARIES  NEPOMUK_QUERY_LIBRARIES 
                 NEPOMUK_ADDONTOLOGIES_FILE  NEPOMUK_RCGEN )

include(FindPackageHandleStandardArgs)
# List all nepomuk and also all necessary soprano variables here, to make it 
# easier for the user to see what was missing:
find_package_handle_standard_args(Nepomuk  DEFAULT_MSG 
                                  NEPOMUK_LIBRARIES  NEPOMUK_INCLUDE_DIR 
                                  NEPOMUK_ADDONTOLOGYCLASSES_FILE  NEPOMUK_RCGEN
                                  Soprano_FOUND SOPRANO_PLUGIN_RAPTORPARSER_FOUND SOPRANO_PLUGIN_REDLANDBACKEND_FOUND
                                  SHAREDDESKTOPONTOLOGIES_FOUND
                                  )

#to retain backward compatibility
set (Nepomuk_FOUND ${NEPOMUK_FOUND})

-------------- next part --------------
A non-text attachment was scrubbed...
Name: NepomukAddOntologyClasses.cmake
Type: text/x-java
Size: 3722 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20091203/412f314d/attachment.java 


More information about the Kde-buildsystem mailing list