From 3d23aba4df9ab8c25d894b6c7709d066c8e26607 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Thu, 8 Nov 2012 02:55:57 +0100 Subject: [PATCH] Fix cmake build of kbugbuster with kcal This resolves bug report 1041 (cherry picked from commit 59a2f3d91922f06ca842abb8680fade79994d4ec) --- kbugbuster/kresources/CMakeLists.txt | 8 ++--- kbugbuster/kresources/ConfigureChecks.cmake | 36 +++++++++++++++++++++ 2 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 kbugbuster/kresources/ConfigureChecks.cmake diff --git a/kbugbuster/kresources/CMakeLists.txt b/kbugbuster/kresources/CMakeLists.txt index a43521ef..eca5595e 100644 --- a/kbugbuster/kresources/CMakeLists.txt +++ b/kbugbuster/kresources/CMakeLists.txt @@ -9,19 +9,19 @@ # ################################################# -tde_import( libkmime ) -tde_import( ktnef ) -tde_import( libkcal ) +include( ConfigureChecks.cmake ) include_directories( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../backend ${TDE_INCLUDE_DIR} ${TQT_INCLUDE_DIRS} + ${LIBKCAL_INCLUDE_DIR} ) link_directories( ${TQT_LIBRARY_DIRS} + ${LIBKCAL_LIBRARY_DIR} ) @@ -38,6 +38,6 @@ tde_add_kpart( kcal_bugzilla AUTOMOC SOURCES kcalresource.cpp kcalresourceconfig.cpp kcalresource_plugin.cpp resourceprefs.kcfgc - LINK kbbbackend_pic-static kcal-shared + LINK kbbbackend_pic-static kdecore-shared kio-shared kabc kcal kresources DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/kbugbuster/kresources/ConfigureChecks.cmake b/kbugbuster/kresources/ConfigureChecks.cmake new file mode 100644 index 00000000..b12337a1 --- /dev/null +++ b/kbugbuster/kresources/ConfigureChecks.cmake @@ -0,0 +1,36 @@ +################################################# +# +# (C) 2012 Slavek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +message( "-- checking for 'libkcal'" ) + +find_path( + LIBKCAL_INCLUDE_DIR + kcalversion.h + PATHS + ${TDE_INCLUDE_DIR}/libkcal + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +find_library( + LIBKCAL_LIBRARY + kcal + PATHS + ${TDE_LIB_DIR} + ${TQT_LIBRARY_DIRS} +) +if( LIBKCAL_LIBRARY ) + get_filename_component( LIBKCAL_LIBRARY_DIR ${LIBKCAL_LIBRARY} PATH CACHE ) +endif( ) + +if( NOT LIBKCAL_INCLUDE_DIR OR NOT LIBKCAL_LIBRARY_DIR ) + tde_message_fatal( "libkcal required, but was not found on your system" ) +endif( )