Conversion to the cmake building system.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Signed-off-by: gregory guy <gregory-tde@laposte.net>
(cherry picked from commit e6036101ea)
r14.0.x
gregory guy 3 years ago committed by Slávek Banko
parent 1558cdbbf7
commit 4b5b36ca6c
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -0,0 +1,82 @@
############################################
# #
# Improvements and feedbacks are welcome #
# #
# This file is released under GPL >= 3 #
# #
############################################
cmake_minimum_required( VERSION 2.8.12 )
#### general package setup
project( kopete_otr )
set( VERSION R14.0.11 )
#### include essential cmake modules
include( FindPkgConfig )
include( CheckFunctionExists )
include( CheckSymbolExists )
include( CheckIncludeFile )
include( CheckLibraryExists )
include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
#### include our cmake modules
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
##### setup install paths
include( TDESetupPaths )
tde_setup_paths( )
##### optional stuff
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
##### user requested modules
option( BUILD_ALL "Build all" ON )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
##### configure checks
include( ConfigureChecks.cmake )
###### global compiler settings
add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
##### directories
add_subdirectory( src )
##### other data
tde_conditional_add_project_docs( BUILD_DOC )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
##### write configure files
configure_file( config.h.cmake config.h @ONLY )

@ -0,0 +1,53 @@
###########################################
# #
# Improvements and feedback are welcome #
# #
# This file is released under GPL >= 3 #
# #
###########################################
# required stuff
find_package( TQt )
find_package( TDE )
tde_setup_architecture_flags( )
include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( )
##### check for gcc visibility support
if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY )
#### check for libotr
pkg_search_module( LIBOTR libotr )
if( LIBOTR_FOUND )
if( NOT LIBOTR_VERSION VERSION_LESS 4.0.0 )
set( HAVE_LIBOTR_0400 1 )
endif()
else()
tde_message_fatal( "Libotr is required but was not found on your system" )
endif( LIBOTR_FOUND )
##### check for kopete
find_library( KOPETE_LIBRARY kopete )
find_path( KOPETE_INCLUDE_DIR kopetemetacontact.h
PATH_SUFFIXES kopete
)
if( KOPETE_INCLUDE_DIR AND KOPETE_LIBRARY )
set( KOPETE_INCLUDE_DIRS "${KOPETE_INCLUDE_DIR}" )
set( KOPETE_LIBRARIES ${KOPETE_LIBRARY} )
else()
tde_message_fatal( "kopete (tdenetwork) is required but was not found on your system" )
endif( KOPETE_INCLUDE_DIR AND KOPETE_LIBRARY )

@ -0,0 +1,11 @@
#define VERSION "@VERSION@"
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
/* Defined if libotr >= 4.0.0 */
#cmakedefine HAVE_LIBOTR_0400 1

@ -0,0 +1 @@
tde_add_project_translations()

@ -0,0 +1,121 @@
add_subdirectory( pics )
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS}
${LIBOTR_INCLUDE_DIRS}
${KOPETE_INCLUDE_DIRS}
${KOPETE_INCLUDE_DIRS}/ui
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### kotr_kcfgc (static)
tde_add_library( kotr_kcfgc STATIC_PIC AUTOMOC
SOURCES
kopete_otr.kcfgc
)
##### kotr (shared)
tde_add_library( kotr SHARED AUTOMOC
SOURCES
otrplugin.cpp
otrguiclient.cpp
otrlchatinterface.cpp
otrlconfinterface.cpp
privkeypopup.cpp
privkeypopupui.ui
smppopup.cpp
smppopupui.ui
verifypopup.cpp
verifypopupui.ui
LINK
kotr_kcfgc-static
tdecore-shared
tdeui-shared
tdeio-shared
${LIBOTR_LIBRARIES}
${KOPETE_LIBRARIES}
VERSION 0.0.0
DESTINATION ${LIB_INSTALL_DIR}
)
##### kcm_kopete_otr (kpart)
tde_add_kpart( kcm_kopete_otr AUTOMOC
SOURCES
otrpreferences.cpp
otrprefs.ui
LINK
kotr_kcfgc-static
kotr-shared
tdecore-shared
tdeui-shared
tdehtml-shared
${LIBOTR_LIBRARIES}
${KOPETE_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### kopete_otr (kpart)
tde_add_kpart( ${PROJECT_NAME} AUTOMOC
SOURCES
otrplugin-factory.cpp
LINK
kotr-shared
tdecore-shared
tdeui-shared
tdehtml-shared
${LIBOTR_LIBRARIES}
${KOPETE_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### other data
install(
FILES otrchatui.rc otrui.rc
DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
)
install(
FILES kopete_otr.kcfg
DESTINATION ${KCFG_INSTALL_DIR}
)
#### desktop files
tde_create_translated_desktop(
SOURCE kopete_otr.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)
tde_create_translated_desktop(
SOURCE kopete_otr_config.desktop
DESTINATION ${SERVICES_INSTALL_DIR}/tdeconfiguredialog
)

@ -0,0 +1,5 @@
##### icons
tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/icons )
tde_install_icons( ${PROJECT_NAME} )
Loading…
Cancel
Save