aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2009-11-22 16:34:29 +0000
committerAlexander Neundorf <neundorf@kde.org>2009-11-22 16:34:29 +0000
commit62d1e8c500349f3e98e1a9dcb793d6f4de98af1d (patch)
tree3d9f3e84aa03c1acef2798ab3fbce19f09c44b45
parent39e15386ff70e6218ae149795c0cfbecf357c79f (diff)
downloadextra-cmake-modules-62d1e8c500349f3e98e1a9dcb793d6f4de98af1d.tar.gz
extra-cmake-modules-62d1e8c500349f3e98e1a9dcb793d6f4de98af1d.tar.bz2
-use find_package() instead of macro_optional_find_package() for soprano inside nepomuk, it doesn't
make sense to be able to disable soprano if nepomuk is enabled -also search for the nepomuk stuff if soprano was not found, this makes it possible to have a better error message at the end -also add the soprano variables to the find_package_handle_standard_args() command for better error messagesa Alex CCMAIL: trueg@kde.org svn path=/trunk/KDE/kdelibs/; revision=1052846
-rw-r--r--modules/FindNepomuk.cmake69
1 files changed, 36 insertions, 33 deletions
diff --git a/modules/FindNepomuk.cmake b/modules/FindNepomuk.cmake
index bc7e5470..24832973 100644
--- a/modules/FindNepomuk.cmake
+++ b/modules/FindNepomuk.cmake
@@ -1,13 +1,13 @@
# Once done this will define
#
-# Nepomuk requires Soprano, so this module checks for Soprano too.
-#
# 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@trueg.de>
@@ -17,43 +17,46 @@
if (NOT DEFINED Soprano_FOUND)
- macro_optional_find_package(Soprano)
+ 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 (Soprano_FOUND)
-
- 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}
- )
-
- mark_as_advanced(NEPOMUK_INCLUDE_DIR NEPOMUK_LIBRARIES NEPOMUK_QUERY_LIBRARIES)
-
-endif (Soprano_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}
+ )
+
+mark_as_advanced(NEPOMUK_INCLUDE_DIR NEPOMUK_LIBRARIES NEPOMUK_QUERY_LIBRARIES)
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_LIBRARIES NEPOMUK_INCLUDE_DIR
+ Soprano_FOUND SOPRANO_PLUGIN_RAPTORPARSER_FOUND SOPRANO_PLUGIN_REDLANDBACKEND_FOUND
+ )
#to retain backward compatibility
set (Nepomuk_FOUND ${NEPOMUK_FOUND})