[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/ioslaves
From: Andrew Coles <andrew_coles () yahoo ! co ! uk>
Date: 2009-03-29 1:34:15
Message-ID: 1238290455.610055.20642.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 946288 by coles:
Mended detection of Beagle, though some work outstanding on the use of
the contrast between the pkgconfig and cmake detection of beagle leading
to uninitialised variables.
M +11 -0 CMakeLists.txt
M +17 -3 kio-beagle/CMakeLists.txt
M +9 -0 kio-beagle/cmake/modules/FindBeagle.cmake
--- trunk/playground/ioslaves/CMakeLists.txt #946287:946288
@@ -1,5 +1,7 @@
project(playground-ioslave)
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} \
${CMAKE_CURRENT_SOURCE_DIR}/kio-beagle/cmake/modules ) +
# search packages used by KDE
find_package(KDE4 REQUIRED)
include (KDE4Defaults)
@@ -8,6 +10,15 @@
macro_optional_add_subdirectory(doc)
+find_package(Beagle QUIET)
+macro_log_feature(BEAGLE_FOUND "Beagle" "Beagle Search System" \
"http://beagle-project.org/" FALSE "" "Required to build Beagle ioslave.") +
+if (BEAGLE_FOUND)
#macro_optional_add_subdirectory(kio-beagle)
+endif (BEAGLE_FOUND)
+
#macro_optional_add_subdirectory(kio-giobridge)
+
+macro_display_feature_log()
+
--- trunk/playground/ioslaves/kio-beagle/CMakeLists.txt #946287:946288
@@ -3,7 +3,7 @@
set(VERSION_MINOR "4")
set(VERSION_PATCH "0")
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules )
+set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules \
)
include(InstallRequiredSystemLibraries)
@@ -27,9 +27,23 @@
find_package(GObject REQUIRED)
find_package(Beagle REQUIRED)
-add_definitions (${QT_DEFINITIONS} ${BEAGLE_DEFINITIONS} ${KDE4_DEFINITIONS})
-include_directories (${GOBJECT_INCLUDE_DIR} ${GLIB2_MAIN_INCLUDE_DIR} \
${BEAGLE_INCLUDE_DIR} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES}) \
+if(BEAGLE_FOUND)
+add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
+
+if(BEAGLE_DEFINITIONS)
+ add_definitions (${BEAGLE_DEFINITIONS})
+endif(BEAGLE_DEFINITIONS)
+
+include_directories (${GOBJECT_INCLUDE_DIR} ${GLIB2_MAIN_INCLUDE_DIR} \
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${KDE4_INCLUDES}) +
+if(BEAGLE_INCLUDE_DIR)
+include_directories(${BEAGLE_INCLUDE_DIR})
+endif(BEAGLE_INCLUDE_DIR)
+
add_subdirectory(src)
add_subdirectory(icons)
add_subdirectory(data)
+
+endif(BEAGLE_FOUND)
+
--- trunk/playground/ioslaves/kio-beagle/cmake/modules/FindBeagle.cmake \
#946287:946288 @@ -5,6 +5,7 @@
# BEAGLE_INCLUDE_DIR - the FindBeagle include directory
# BEAGLE_LIBRARIES - Link these to use FindBeagle
# BEAGLE_DEFINITIONS - Compiler switches required for using FindBeagle
+# BEAGLE_LINK_FLAGS - Compiler switches required to link against Beagle
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
@@ -24,8 +25,11 @@
SET(BEAGLE_DEFINITIONS ${_BeagleCflags})
SET(BEAGLE_LINK_FLAGS ${_BeagleLinkFlags})
+ SET(BEAGLE_FOUND )
endif( NOT WIN32 )
+if (NOT BEAGLE_FOUND)
+
FIND_PATH(BEAGLE_INCLUDE_DIR NAMES beagle/beagle.h
PATHS
${_BeagleIncDir}
@@ -45,3 +49,8 @@
# show the BEAGLE_INCLUDE_DIR and BEAGLE_LIBRARIES variables only in the advanced \
view MARK_AS_ADVANCED(BEAGLE_INCLUDE_DIR BEAGLE_LIBRARIES )
+if(BEAGLE_LIBRARIES AND BEAGLE_INCLUDE_DIR)
+ set(BEAGLE_FOUND)
+endif(BEAGLE_LIBRARIES AND BEAGLE_INCLUDE_DIR)
+
+endif(NOT BEAGLE_FOUND)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic