Commit 4fcacce4 authored by Heiko Becker's avatar Heiko Becker
Browse files

build: Require cmake 3.16 and clean up a bit

Allows us to use FindALSA from cmake instead of kdelibs4support and
FindEXPAT from cmake instead of our own.
parent 69f6c311
Pipeline #147609 passed with stage
in 3 minutes and 15 seconds
cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
cmake_minimum_required(VERSION 3.16)
project(kopete)
......@@ -68,11 +68,11 @@ find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION_LIB} CONFIG REQUIRED)
### Alphabetical list of optional packages ###
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(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(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(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(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")
......
# cmake macro to test Expat
# Copyright (c) 2009, Pali Rohár <pali.rohar@gmail.com>
#
# EXPAT_FOUND
# EXPAT_INCLUDE_DIR
# EXPAT_LIBRARY
include ( FindPackageHandleStandardArgs )
if ( EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY )
set ( EXPAT_FOUND true )
else ( EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY )
find_path ( EXPAT_INCLUDE_DIR expat.h )
find_library ( EXPAT_LIBRARY NAMES expat )
if ( EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY )
set ( EXPAT_FOUND true )
message ( STATUS "Found Expat: ${EXPAT_LIBRARY}" )
else ( EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY )
set ( EXPAT_FOUND false )
message ( STATUS "Not found Expat" )
endif ( EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY )
mark_as_advanced ( EXPAT_INCLUDE_DIR EXPAT_LIBRARY )
endif ( EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY )
......@@ -67,7 +67,7 @@ endif()
if(WITH_pipes)
add_subdirectory ( pipes )
endif()
if(WITH_webpresence AND LIBXML2_FOUND AND LIBXSLT_FOUND)
if(WITH_webpresence AND LibXml2_FOUND AND LIBXSLT_FOUND)
add_subdirectory( webpresence )
endif()
if (WITH_otr AND LIBOTR_FOUND)
......
include_directories(${KOPETE_INCLUDES} ${LIBXML2_INCLUDE_DIR} ${LIBXSLT_INCLUDE_DIR})
include_directories(${KOPETE_INCLUDES} ${LIBXSLT_INCLUDE_DIR})
########### next target ###############
......@@ -12,8 +12,8 @@ target_link_libraries(
kopete_webpresence
KF5::KIOCore
kopete
${LIBXML2_LIBRARIES}
${LIBXSLT_LIBRARIES}
LibXml2::LibXml2
${LIBXSLT_LIBRARIES}
Qt5::Xml
KF5::I18n
)
......
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/libgroupwise/tasks ${CMAKE_CURRENT_SOURCE_DIR}/libgroupwise ${CMAKE_CURRENT_SOURCE_DIR}/ui ${QCA2_INCLUDE_DIR} )
include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/libgroupwise/tasks ${CMAKE_CURRENT_SOURCE_DIR}/libgroupwise ${CMAKE_CURRENT_SOURCE_DIR}/ui )
add_subdirectory( libgroupwise )
add_subdirectory( icons )
......@@ -55,7 +55,7 @@ add_library(kopete_groupwise MODULE ${kopete_groupwise_PART_SRCS})
link_directories( ${CMAKE_CURRENT_BINARY_DIR}/libgroupwise )
target_link_libraries(kopete_groupwise KF5::KDELibs4Support qgroupwise kopete ${QCA2_LIBRARIES})
target_link_libraries(kopete_groupwise KF5::KDELibs4Support qgroupwise kopete qca-qt5)
install(TARGETS kopete_groupwise DESTINATION ${KDE_INSTALL_PLUGINDIR})
......
......@@ -3,7 +3,6 @@ add_definitions( -DKDE_DEFAULT_DEBUG_AREA=${GROUPWISE_DEBUG_LIBGW} )
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/tasks
${QCA2_INCLUDE_DIR}
)
########### tasks target ###############
......@@ -82,7 +81,7 @@ set( libqgroupwise_SRCS
add_library( qgroupwise SHARED ${libqgroupwise_tasks_SRCS} ${libqgroupwise_SRCS} )
target_link_libraries( qgroupwise Qt5::Core Qt5::Gui Qt5::Network qca-qt5 ${ZLIB_LIBRARIES} KF5::KDELibs4Support)
target_link_libraries( qgroupwise Qt5::Core Qt5::Gui Qt5::Network qca-qt5 ZLIB::ZLIB KF5::KDELibs4Support)
########### install files ###############
......
include_directories( ${KOPETE_SOURCE_DIR}/protocols/groupwise/libgroupwise/qca/src )
########### next target ###############
set(task_take_test_SRCS task_take_test.cpp )
......
include_directories( ${KOPETE_SOURCE_DIR}/protocols/groupwise ${KOPETE_SOURCE_DIR}/protocols/groupwise/libgroupwise ${KOPETE_SOURCE_DIR}/protocols/groupwise/libgroupwise/qca/src )
include_directories( ${KOPETE_SOURCE_DIR}/protocols/groupwise ${KOPETE_SOURCE_DIR}/protocols/groupwise/libgroupwise )
########### next target ###############
......
......@@ -10,7 +10,6 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/tasks/
${CMAKE_CURRENT_SOURCE_DIR}/libiris/include/iris
${CMAKE_CURRENT_SOURCE_DIR}/libiris/src
${QCA2_INCLUDE_DIR}
)
if(BUILD_LIBJINGLE)
......@@ -21,7 +20,7 @@ endif(BUILD_LIBJINGLE)
IF(BUILD_JINGLE)
add_definitions(-DJINGLE_SUPPORT)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/jingle)
include_directories(${LIBORTP_INCLUDE_DIR} ${ALSA_INCLUDES} ${SPEEX_INCLUDE_DIR})
include_directories(${LIBORTP_INCLUDE_DIR} ${SPEEX_INCLUDE_DIR})
ENDIF(BUILD_JINGLE)
#link_directories( ${CMAKE_CURRENT_BINARY_DIR}/libiris/ ${CMAKE_CURRENT_BINARY_DIR}/jingle/ )
......@@ -165,9 +164,9 @@ endif(BUILD_JINGLE)
add_library(kopete_jabber MODULE ${kopete_jabber_PART_SRCS})
generate_export_header(kopete_jabber BASE_NAME jabber)
target_link_libraries(kopete_jabber KF5::KIOCore ${QCA2_LIBRARIES} kopete iris_kopete)
target_link_libraries(kopete_jabber KF5::KIOCore qca-qt5 kopete iris_kopete)
if(BUILD_JINGLE)
target_link_libraries(kopete_jabber ${LIBORTP_LIBRARY} ${ASOUND_LIBRARY} ${SPEEX_LIBRARY})
target_link_libraries(kopete_jabber ${LIBORTP_LIBRARY} ALSA::ALSA ${SPEEX_LIBRARY})
endif(BUILD_JINGLE)
install(TARGETS kopete_jabber DESTINATION ${KDE_INSTALL_PLUGINDIR})
......
......@@ -26,7 +26,6 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/src/irisnet/appledns
${IDN_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
${DNSSD_INCLUDE_DIR}
)
......@@ -132,7 +131,7 @@ endif(CMAKE_COMPILER_IS_GNUCXX)
add_library(iris_kopete STATIC ${libiris_SRCS})
set(iris_kopete_libs Qt5::Core Qt5::Network Qt5::Xml Qt5::Gui Qt5::Widgets
${IDN_LIBRARIES} qca-qt5 ${ZLIB_LIBRARIES} )
${IDN_LIBRARIES} qca-qt5 ZLIB::ZLIB )
if(WIN32)
set(iris_kopete_libs ${iris_kopete_libs} ws2_32)
......
......@@ -63,7 +63,6 @@ set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undef -Wno-unused-parameter -Wno-
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/talk/third_party/libudev
${EXPAT_INCLUDE_DIR}
${MEDIASTREAMER_INCLUDE_DIR}
${LIBORTP_INCLUDE_DIR}
${SRTP_INCLUDE_DIR}
......@@ -281,7 +280,7 @@ set ( call_SRCS
set ( call_LIBS
${SRTP_LIBRARY}
${JSONCPP_LIBRARY}
${EXPAT_LIBRARY}
EXPAT::EXPAT
${MEDIASTREAMER_LIBRARIES}
${LIBORTP_LIBRARY}
${CMAKE_DL_LIBS}
......
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