[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: Re: [kopete-devel] [PATCH] Telepathy protocol
From: Maciej Mrozowski <reavertm () poczta ! fm>
Date: 2008-12-02 7:42:01
Message-ID: 200812020842.01593.reavertm () poczta ! fm
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
On Saturday 29 of November 2008 09:53:59 Pali Rohár wrote:
> Hello,
> I cant compile telepathy protocol because library QtTapioca cant found.
> I fix FindDecibel.cmake file and then it works. I'm sending
> decibel.patch file.
I'm sending counter proposal - my decibel cmake patch - it's a bit more robust
(handles pkg-config library dirs) so it should work on every package-config-
aware Unices and well as on some windows configurations (though not tested).
Please try it out.
And one note - find_package_standard_args seems to be badly invoked in some
cmake modules - (reversed order of arguments: library dirs and include dirs) -
but that's matter o aesthetics - as it doesn't change the behaviour (macro
just looks for presence of both variables). Using this function is pain as
well as it rejects libraries whose includes reside in /usr/include as pkg-
config returns empty INLUDE_DIRS for them, and this macro treats library as
not found.
Anyway - some cmake modules would need some love indeed - there are many
copy&paste modules that could be encapsulated in functions (see my FindDecibel
module and some other modules for reference). I guess developers should not be
bothered as bugfixing 4.2 is more important now, but 3rd party's like me or
other contributors could help here.
--
regards
MM
----------------------------------------------------------------------
Doladowanie telefonu. Szybko i wygodnie.
Sprawdz >> http://link.interia.pl/f1fa8
["FindDecibel.cmake" (text/x-cmake)]
# - Try to find Decibel packages (QtTapioca, QtTelepathy)
# Once done this will define
#
# DECIBEL_FOUND - Test has found Decibel dependencies
# DECIBEL_INCLUDES - Include needed for Decibel
# DECIBEL_LIBRARIES - Libraries needed for Decibel
# DECIBEL_DEFINITIONS - Compiler swithces required for using Decibel
#
# QT_TELEPATHY_INCLUDE_DIR - Include needed for QtTelepathy
# QT_TELEPATHY_LIBRARY - Library for QtTelepathy
# QT_TAPIOCA_INCLUDE_DIR - Included need for QtTapioca
# QT_TAPIOCA_LIBRARY - Library for QtTapioca
#
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
#
# Copyright (c) 2008, Maciej Mrozowski, <reavertm@poczta.fm>
# TODO separate modules for QtTelepathy and QtTapioca
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
include (FindLibraryWithDebug)
# Decibel
if (DECIBEL_INCLUDES AND DECIBEL_LIBRARIES)
# in cache already
set (DECIBEL_FOUND TRUE)
else (DECIBEL_INCLUDES AND DECIBEL_LIBRARIES)
if (NOT WIN32)
find_package (PkgConfig)
pkg_check_modules (PC_DECIBEL Decibel)
if (PC_DECIBEL_FOUND)
set (DECIBEL_DEFINITIONS ${PC_DECIBEL_CFLAGS})
if (PC_DECIBEL_INCLUDE_DIRS)
set (DECIBEL_INCLUDES ${PC_DECIBEL_INCLUDE_DIRS})
else (PC_DECIBEL_INCLUDE_DIRS)
find_path (DECIBEL_INCLUDES ProtocolManager PATH_SUFFIXES Decibel)
endif (PC_DECIBEL_INCLUDE_DIRS)
find_library (DECIBEL_LIBRARIES NAMES Decibel
PATHS
${PC_DECIBEL_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
else (PC_DECIBEL_FOUND)
find_library (DECIBEL_LIBRARIES NAMES Decibel)
find_path (DECIBEL_INCLUDES ProtocolManager PATH_SUFFIXES Decibel)
endif (PC_DECIBEL_FOUND)
else (NOT WIN32)
find_library_with_debug (DECIBEL_LIBRARIES
WIN32_DEBUG_POSTFIX d
NAMES Decibel
)
find_path (DECIBEL_INCLUDES ProtocolManager PATH_SUFFIXES Decibel)
endif (NOT WIN32)
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (DECIBEL DEFAULT_MSG DECIBEL_INCLUDES \
DECIBEL_LIBRARIES) mark_as_advanced (DECIBEL_INCLUDES DECIBEL_LIBRARIES)
endif (DECIBEL_INCLUDES AND DECIBEL_LIBRARIES)
# QtTelepathyClient
if (QT_TELEPATHY_INCLUDE_DIR AND QT_TELEPATHY_LIBRARY)
# in cache already
set (QT_TELEPATHY_FOUND TRUE)
else (QT_TELEPATHY_INCLUDE_DIR AND QT_TELEPATHY_LIBRARY)
if (NOT WIN32)
find_package (PkgConfig)
pkg_check_modules (PC_QT_TELEPATHY QtTelepathyClient)
if (PC_QT_TELEPATHY_FOUND)
if (PC_QT_TELEPATHY_INCLUDE_DIRS)
set (QT_TELEPATHY_INCLUDE_DIR ${PC_QT_TELEPATHY_INCLUDE_DIRS})
else (PC_QT_TELEPATHY_INCLUDE_DIRS)
find_path (QT_TELEPATHY_INCLUDE_DIR Client/Connection_Manager \
PATH_SUFFIXES QtTelepathy) endif (PC_QT_TELEPATHY_INCLUDE_DIRS)
find_library (QT_TELEPATHY_LIBRARY NAMES QtTelepathyClient
PATHS
${PC_QT_TELEPATHY_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
else (PC_QT_TELEPATHY_FOUND)
find_library (QT_TELEPATHY_LIBRARY NAMES QtTelepathyClient)
find_path (QT_TELEPATHY_INCLUDE_DIR Client/Connection_Manager \
PATH_SUFFIXES QtTelepathy)
endif (PC_QT_TELEPATHY_FOUND)
else (NOT WIN32)
find_library_with_debug (QT_TELEPATHY_LIBRARY
WIN32_DEBUG_POSTFIX d
NAMES QtTelepathyClient
)
find_path (QT_TELEPATHY_INCLUDE_DIR Client/Connection_Manager PATH_SUFFIXES \
QtTelepathy)
endif (NOT WIN32)
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (QT_TELEPATHY DEFAULT_MSG \
QT_TELEPATHY_INCLUDE_DIR QT_TELEPATHY_LIBRARY) mark_as_advanced \
(QT_TELEPATHY_INCLUDE_DIR QT_TELEPATHY_LIBRARY)
endif (QT_TELEPATHY_INCLUDE_DIR AND QT_TELEPATHY_LIBRARY)
# QtTapioca
if (QT_TAPIOCA_INCLUDE_DIR AND QT_TAPIOCA_LIBRARY)
# in cache already
set (QT_TAPIOCA_FOUND TRUE)
else (QT_TAPIOCA_INCLUDE_DIR AND QT_TAPIOCA_LIBRARY)
if (NOT WIN32)
find_package (PkgConfig)
pkg_check_modules (PC_QT_TAPIOCA QtTapioca)
if (PC_QT_TAPIOCA_FOUND)
if (PC_QT_TAPIOCA_INCLUDE_DIRS)
set (QT_TAPIOCA_INCLUDE_DIR ${PC_QT_TAPIOCA_INCLUDE_DIRS})
else (PC_QT_TAPIOCA_INCLUDE_DIRS)
find_path (QT_TAPIOCA_INCLUDE_DIR TapiocaExport PATH_SUFFIXES \
QtTapioca) endif (PC_QT_TAPIOCA_INCLUDE_DIRS)
find_library (QT_TAPIOCA_LIBRARY NAMES QtTapioca
PATHS
${PC_QT_TAPIOCA_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
else (PC_QT_TAPIOCA_FOUND)
find_library (QT_TAPIOCA_LIBRARY NAMES QtTapioca)
find_path (QT_TAPIOCA_INCLUDE_DIR TapiocaExport PATH_SUFFIXES QtTapioca)
endif (PC_QT_TAPIOCA_FOUND)
else (NOT WIN32)
find_library_with_debug (QT_TAPIOCA_LIBRARY
WIN32_DEBUG_POSTFIX d
NAMES QtTapioca
)
find_path (QT_TAPIOCA_INCLUDE_DIR TapiocaExport PATH_SUFFIXES QtTapioca)
endif (NOT WIN32)
include (FindPackageHandleStandardArgs)
find_package_handle_standard_args (QT_TAPIOCA DEFAULT_MSG QT_TAPIOCA_INCLUDE_DIR \
QT_TAPIOCA_LIBRARY) mark_as_advanced (QT_TAPIOCA_INCLUDE_DIR QT_TAPIOCA_LIBRARY)
endif (QT_TAPIOCA_INCLUDE_DIR AND QT_TAPIOCA_LIBRARY)
--Boundary-01=_JbONJn31FI51+Fk--
["signature.asc" (application/pgp-signature)]
_______________________________________________
kopete-devel mailing list
kopete-devel@kde.org
https://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic