Commit 5b8fd228 authored by Alexey Chernov's avatar Alexey Chernov Committed by Pali Rohár

Fix several CMake files

Fix some issues with CMake in root and protocols' CMakeLists.txt,
fix pkg-config-based search for libmeanwhile, remove kde4-related
command.
parent c05ae55e
......@@ -11,7 +11,7 @@ set(REQUIRED_QT_VERSION "5.2.0")
#ECM modules configurations
find_package(ECM 1.7 REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_MODULE_DIR} ${ECM_KDE_MODULE_DIR} ${KOPETE_SOURCE_DIR}/cmake)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_MODULE_DIR} ${ECM_KDE_MODULE_DIR} ${KOPETE_SOURCE_DIR}/cmake/modules)
find_package(Phonon4Qt5 REQUIRED NO_MODULE)
find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Core)
......@@ -63,82 +63,82 @@ endif(DISABLE_VIDEOSUPPORT)
### Alphabetical list of optional packages ###
find_package(Alsa QUIET CONFIG)
find_package(Alsa QUIET)
set_package_properties(Alsa PROPERTIES DESCRIPTION "Alsa is advanced linux sound Architecture" URL "http://www.alsa-project.org" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support")
find_package(Boost QUIET CONFIG)
find_package(Boost QUIET)
set_package_properties(Boost PROPERTIES DESCRIPTION "C++ Boost libraries" URL "http://www.boost.org/" TYPE OPTIONAL PURPOSE "Required for the WLM protocol")
find_package(Expat QUIET CONFIG)
find_package(Expat QUIET)
set_package_properties(Expat PROPERTIES DESCRIPTION "Expat is a stream oriented XML parser" URL "http://expat.sourceforge.net/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support")
find_package(GIF QUIET CONFIG)
find_package(GIF QUIET)
set_package_properties(GIF PROPERTIES DESCRIPTION "GIF - Package of portable tools and library routines for working with GIF images" URL "http://giflib.sourceforge.net/" TYPE OPTIONAL PURPOSE "Required for the WLM protocol with handwriting messages support")
find_package(GLIB2 QUIET CONFIG)
find_package(GLIB2 QUIET)
set_package_properties(GLIB2 PROPERTIES DESCRIPTION "GLib library" URL "http://www.gtk.org" TYPE OPTIONAL PURPOSE "Required for the Nowlistening plugin with XMMS player support")
find_package(IDN QUIET CONFIG)
find_package(IDN QUIET)
set_package_properties(IDN PROPERTIES DESCRIPTION "GNU Libidn International Domain Name(IDN) implementation" URL "http://www.gnu.org/software/libidn/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol")
find_package(Jasper QUIET CONFIG)
find_package(Jasper QUIET)
set_package_properties(Jasper PROPERTIES DESCRIPTION "Jasper library implements the codec specified in the JPEG-200 Part-1 standard" URL "http://www.ece.uvic.ca/~mdadams/jasper/" TYPE OPTIONAL PURPOSE "Required for the Yahoo protocol")
find_package(JsonCpp QUIET CONFIG)
find_package(JsonCpp QUIET)
set_package_properties(JsonCpp PROPERTIES DESCRIPTION "JsonCpp is an implementation of a JSON reader and writer in C++" URL "http://jsoncpp.sourceforge.net/" TYPE OPTIONAL PURPOSE "Required for the jabber protocol")
find_package(Kleopatra QUIET CONFIG)
find_package(Kleopatra QUIET)
set_package_properties(Kleopatra PROPERTIES DESCRIPTION "The Kleopatra libraries (from kdepim)" URL "http://kde.org/" TYPE OPTIONAL PURPOSE "Required for the Cryptography plugin")
find_package(Libgadu QUIET CONFIG)
find_package(Libgadu QUIET)
set_package_properties(Libgadu PROPERTIES DESCRIPTION "A library providing support for the Gadu-Gadu protocol" URL "http://www.toxygen.net/libgadu" TYPE OPTIONAL PURPOSE "Required for the Gadu-Gadu protocol")
find_package(LibMeanwhile QUIET CONFIG)
find_package(LibMeanwhile QUIET)
set_package_properties(LibMeanwhile PROPERTIES DESCRIPTION "A library for protocol support for connection to sametime servers" URL "http://meanwhile.sourceforge.net/" TYPE OPTIONAL PURPOSE "Required for the meanwhile protocol")
find_package(Libmsn QUIET CONFIG)
find_package(Libmsn QUIET)
set_package_properties(Libmsn PROPERTIES DESCRIPTION "A library providing support for the msn protocol" URL "http://libmsn.sourceforge.net/" TYPE OPTIONAL PURPOSE "Required for the WLM protocol")
find_package(LiboRTP QUIET CONFIG)
find_package(LiboRTP QUIET)
set_package_properties(LiboRTP PROPERTIES DESCRIPTION "oRTP provides an API to send rtp packets" URL "http://www.linphone.org/index.php/eng/code_review/ortp/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support and for the WLM protocol with voice clips support")
find_package(LibOTR QUIET CONFIG)
find_package(LibOTR QUIET)
set_package_properties(LibOTR PROPERTIES DESCRIPTION "Library to encrypt messages with off-the-record encryption" URL "http://www.cypherpunks.ca/otr/" TYPE OPTIONAL PURPOSE "Required for the OTR plugin")
find_package(LibV4L2 QUIET CONFIG)
find_package(LibV4L2 QUIET)
set_package_properties(LibV4L2 PROPERTIES DESCRIPTION "Collection of video4linux support libraries" URL "http://hansdegoede.livejournal.com http://linuxtv.org/hq/~hgoede/libv4l/" TYPE OPTIONAL PURPOSE "Required for better webcam support on Linux")
find_package(LibXml2 QUIET CONFIG)
find_package(LibXml2 QUIET)
set_package_properties(LibXml2 PROPERTIES DESCRIPTION "Libraries used to develop XML applications" URL "http://www.xmlsoft.org/" TYPE OPTIONAL PURPOSE "Required for Webpresence plugin")
find_package(LibXslt QUIET CONFIG)
set_package_properties(Alsa PROPERTIES DESCRIPTION "A library to transofrm XML files into other XML files" URL "http://www.xmlsoft.org/XSLT/" TYPE OPTIONAL PURPOSE "Required for the Webpresence plugin")
find_package(LibXslt QUIET)
set_package_properties(LibXslt PROPERTIES DESCRIPTION "A library to transform XML files into other XML files" URL "http://www.xmlsoft.org/XSLT/" TYPE OPTIONAL PURPOSE "Required for the Webpresence plugin")
find_package(Mediastreamer QUIET CONFIG)
find_package(Mediastreamer QUIET)
set_package_properties(Mediastreamer PROPERTIES DESCRIPTION "A streaming enginer specialized for voice/video telephony applications" URL "http://www.linphone.org/index.php/eng/code_review/mediastreamer2/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support and for the WLM protocol with voice clips support")
find_package(OpenSSL QUIET CONFIG)
find_package(OpenSSL QUIET)
set_package_properties(OpenSSL PROPERTIES DESCRIPTION "OpenSSL implementation of SSL" URL "https://www.openssl.org/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support")
find_package(QCA2 QUIET CONFIG)
set_package_properties(QCA2 PROPERTIES DESCRIPTION "Qt Cryptographic Architecture" URL "http://delta.affinix.com/qca/" TYPE OPTIONAL PURPOSE "Required for the GroupWise and Jabber protocols")
find_package(Qca-qt5 QUIET CONFIG)
set_package_properties(Qca-qt5 PROPERTIES DESCRIPTION "Qt Cryptographic Architecture" URL "http://delta.affinix.com/qca/" TYPE OPTIONAL PURPOSE "Required for the GroupWise and Jabber protocols")
find_package(QGpgme QUIET CONFIG)
set_package_properties(QGpgme PROPERTIES DESCRIPTION "QGpgME library (from kdepimlibs)" URL "http://www.kde.org/" TYPE OPTIONAL PURPOSE "Required for the Cryptography plugin")
find_package(Sqlite QUIET CONFIG)
find_package(Sqlite QUIET)
set_package_properties(Sqlite PROPERTIES DESCRIPTION "SQLite is a Binary-Database" URL "http://www.sqlite.org" TYPE OPTIONAL PURPOSE "Required for the Statistic plugin")
find_package(Speex QUIET CONFIG)
find_package(Speex QUIET)
set_package_properties(Speex PROPERTIES DESCRIPTION "Speex is an encoder/decoder for the speex audio format" URL "http://www.speex.org/" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with Jingle support")
find_package(SRTP QUIET CONFIG)
find_package(SRTP QUIET)
set_package_properties(SRTP PROPERTIES DESCRIPTION "SRTP provides an implementation of the Secure Real-time Transport protocol(SRTP)" URL "http://srtp.sourceforge.net/srtp.html" TYPE OPTIONAL PURPOSE "Required for the Jabber protocol with libjingle support")
find_package(Xmms QUIET CONFIG)
find_package(Xmms QUIET)
set_package_properties(Xmms PROPERTIES DESCRIPTION "X Multimedia System development libraries" URL "http://www.xmms.org/" TYPE OPTIONAL PURPOSE "Required for the Nowlistening plugin with XMMS player support")
find_package(ZLIB QUIET CONFIG)
find_package(ZLIB QUIET)
set_package_properties(ZLIB PROPERTIES DESCRIPTION "Zlib is a library implementing the deflate compression method" URL "http://zlib.net/" TYPE OPTIONAL PURPOSE "Required for the GroupWise and Jabber protocols")
if(Q_WS_X11)
......@@ -146,7 +146,7 @@ if(Q_WS_X11)
endif(Q_WS_X11)
set(KOPETE_INCLUDES
${KDEPIMLIBS_INCLUDE_DIRS}
${KOPETE_SOURCE_DIR}/libkopete/
${KOPETE_BINARY_DIR}/libkopete/
......
......@@ -6,25 +6,21 @@
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
IF (NOT WIN32)
INCLUDE(UsePkgConfig)
INCLUDE(FindPkgConfig)
PKGCONFIG(meanwhile
_LibMeanwhileIncDir
_LibMeanwhileLinkDir
_LibMeanwhileLinkFlags
_LibMeanwhileCflags)
pkg_check_modules(MEANWHILE meanwhile)
FIND_PATH(LIBMEANWHILE_INCLUDE_DIR meanwhile/mw_common.h
PATHS
${_LibMeanwhileIncDir}
${MEANWHILE_INCLUDE_DIRS}
NO_DEFAULT_PATH
)
set(LIBMEANWHILE_DEFINITIONS ${_LibMeanwhileCflags})
set(LIBMEANWHILE_DEFINITIONS ${MEANWHILE_CFLAGS})
FIND_LIBRARY(LIBMEANWHILE_LIBRARY NAMES meanwhile libmeanwhile
PATHS
${_LibMeanwhileLinkDir}
${MEANWHILE_LIBRARY_DIRS}
NO_DEFAULT_PATH
)
ELSE (NOT WIN32)
......
......@@ -5,7 +5,6 @@
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
INCLUDE(MacroEnsureVersion)
INCLUDE(FindPackageHandleStandardArgs)
IF (LIBOTR_INCLUDE_DIR AND LIBOTR_LIBRARY)
......@@ -23,7 +22,9 @@ IF( LIBOTR_INCLUDE_DIR AND LIBOTR_LIBRARY )
STRING(REGEX MATCH "OTRL_VERSION \"[0-9]+\\.[0-9]+\\.[0-9]+" LIBOTR_VERSION "${output}")
STRING(REGEX REPLACE "^OTRL_VERSION \"" "" LIBOTR_VERSION "${LIBOTR_VERSION}")
# Check if version is at least 4.0.0
MACRO_ENSURE_VERSION("4.0.0" ${LIBOTR_VERSION} LIBOTR_FOUND)
IF( LIBOTR_VERSION VERSION_GREATER "4.0.0" )
SET( LIBOTR_FOUND TRUE )
ENDIF ( LIBOTR_VERSION VERSION_GREATER "4.0.0" )
IF( LIBOTR_FOUND )
IF( NOT LIBOTR_FIND_QUIETLY )
......
......@@ -80,7 +80,7 @@ if(NOT WIN32)
endif(NOT APPLE AND WITH_skype)
endif(NOT WIN32)
if(QCA2_FOUND AND ZLIB_FOUND)
if(Qca-qt5_FOUND AND ZLIB_FOUND)
if(IDN_FOUND AND QJSON_FOUND)
if(WITH_jabber)
add_subdirectory( jabber )
......@@ -91,9 +91,9 @@ if(QCA2_FOUND AND ZLIB_FOUND)
if(WITH_groupwise)
add_subdirectory( groupwise )
endif(WITH_groupwise)
else(QCA2_FOUND AND ZLIB_FOUND)
else(Qca-qt5_FOUND AND ZLIB_FOUND)
message(STATUS "${CMAKE_CURRENT_SOURCE_DIR}: Disabled GroupWise and Jabber because QCA2 was not found")
endif(QCA2_FOUND AND ZLIB_FOUND)
endif(Qca-qt5_FOUND AND ZLIB_FOUND)
if(WITH_testbed)
add_subdirectory( testbed )
......
......@@ -25,7 +25,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/src/irisnet/noncore/legacy
${CMAKE_CURRENT_SOURCE_DIR}/src/irisnet/corelib
${CMAKE_CURRENT_SOURCE_DIR}/src/irisnet/appledns
${QCA2_INCLUDE_DIR}
${IDN_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
${DNSSD_INCLUDE_DIR}
......@@ -121,107 +120,6 @@ endif(WIN32)
set(libiris_SRCS
${cutestuff_SRCS}
${iris_SRCS}
)
kde4_moc_headers(iris_kopete
src/xmpp/base/randrandomnumbergenerator.h
src/xmpp/base/randomnumbergenerator.h
src/xmpp/base/timezone.h
src/xmpp/jid/jid.h
src/irisnet/noncore/cutestuff/bytestream.h
src/irisnet/noncore/cutestuff/socks.h
src/irisnet/noncore/cutestuff/httpconnect.h
src/irisnet/noncore/cutestuff/bsocket.h
src/irisnet/noncore/cutestuff/httppoll.h
src/irisnet/noncore/iceturntransport.h
src/irisnet/noncore/icecomponent.h
src/irisnet/noncore/icetransport.h
src/irisnet/noncore/turnclient.h
src/irisnet/noncore/udpportreserver.h
src/xmpp/xmpp-im/xmpp_xdata.h
src/xmpp/xmpp-im/xmpp_rosterx.h
src/xmpp/xmpp-im/xmpp_tasks.h
src/xmpp/xmpp-im/xmpp_discoitem.h
src/xmpp/xmpp-im/xmpp_pubsubretraction.h
src/xmpp/xmpp-im/xmpp_xmlcommon.h
src/xmpp/xmpp-im/xmpp_roster.h
src/xmpp/xmpp-im/xmpp_muc.h
src/xmpp/xmpp-im/xmpp_htmlelement.h
src/xmpp/xmpp-im/xmpp_receipts.h
src/xmpp/xmpp-im/xmpp_message.h
src/xmpp/xmpp-im/xmpp_discoinfotask.h
src/xmpp/xmpp-im/xmpp_ibb.h
src/xmpp/xmpp-im/xmpp_liverosteritem.h
src/xmpp/xmpp-im/xmpp_httpauthrequest.h
src/xmpp/xmpp-im/xmpp_pubsubitem.h
src/xmpp/xmpp-im/xmpp_vcard.h
src/xmpp/xmpp-im/xmpp_client.h
src/xmpp/xmpp-im/s5b.h
src/xmpp/xmpp-im/xmpp_url.h
src/xmpp/xmpp-im/xmpp_chatstate.h
src/xmpp/xmpp-im/xmpp_task.h
src/xmpp/xmpp-im/xmpp_address.h
src/xmpp/xmpp-im/xmpp_agentitem.h
src/xmpp/xmpp-im/filetransfer.h
src/xmpp/xmpp-im/xmpp_status.h
src/xmpp/xmpp-im/xmpp_captcha.h
src/xmpp/xmpp-im/xmpp_resourcelist.h
src/xmpp/xmpp-im/xmpp_liveroster.h
src/xmpp/xmpp-im/xmpp_resource.h
src/xmpp/xmpp-im/xmpp_rosteritem.h
src/xmpp/xmpp-im/xmpp_features.h
src/xmpp/xmpp-im/xmpp_caps.h
src/xmpp/xmpp-im/im.h
src/xmpp/sasl/digestmd5response.h
src/xmpp/sasl/digestmd5proplist.h
src/xmpp/sasl/plainmessage.h
src/xmpp/sasl/scramsha1response.h
src/xmpp/zlib/common.h
src/xmpp/zlib/zlibdecompressor.h
src/xmpp/zlib/zlibcompressor.h
src/xmpp/xmpp-core/xmpp_stanza.h
src/xmpp/xmpp-core/simplesasl.h
src/xmpp/xmpp-core/securestream.h
src/xmpp/xmpp-core/protocol.h
src/xmpp/xmpp-core/compressionhandler.h
src/xmpp/xmpp-core/xmlprotocol.h
src/xmpp/xmpp-core/sm.h
src/xmpp/xmpp-core/xmpp.h
src/xmpp/xmpp-core/xmpp_clientstream.h
src/xmpp/xmpp-core/xmpp_stream.h
src/xmpp/xmpp-core/td.h
src/xmpp/xmpp-core/parser.h
src/irisnet/noncore/stuntransaction.h
src/irisnet/noncore/stunbinding.h
src/irisnet/noncore/legacy/ndns.h
src/irisnet/noncore/legacy/safedelete.h
src/irisnet/noncore/legacy/servsock.h
src/irisnet/noncore/legacy/srvresolver.h
src/irisnet/noncore/stunallocate.h
src/irisnet/noncore/ice176.h
src/irisnet/noncore/processquit.h
src/irisnet/noncore/icelocaltransport.h
src/irisnet/corelib/irisnetglobal.h
src/irisnet/corelib/objectsession.h
src/irisnet/corelib/netavailability.h
src/irisnet/corelib/netnames.h
src/irisnet/corelib/irisnetplugin.h
src/irisnet/corelib/netinterface.h
src/jdns/src/jdns/jdns_packet.h
src/jdns/src/jdns/jdns_mdnsd.h
src/jdns/src/jdns/jdns_p.h
src/jdns/include/jdns/jdns.h
src/jdns/src/qjdns/qjdns_sock.h
src/jdns/src/qjdns/qjdns_p.h
src/jdns/src/qjdns/qjdnsshared_p.h
src/jdns/include/jdns/qjdns.h
src/jdns/include/jdns/qjdnsshared.h
src/jdns/include/jdns/jdns_export.h
)
add_definitions(-DIRISNET_STATIC)
......@@ -234,7 +132,7 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
add_library(iris_kopete STATIC ${libiris_SRCS})
set(iris_kopete_libs Qt5::Core Qt5::Network Qt5::Xml
${IDN_LIBRARIES} ${QCA2_LIBRARIES} ${ZLIB_LIBRARIES} )
${IDN_LIBRARIES} qca-qt5 ${ZLIB_LIBRARIES} )
if(WIN32)
set(iris_kopete_libs ${iris_kopete_libs} ws2_32)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment