Updated cmake related code to TDE standard.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/5/head
Michele Calgaro 2 years ago
parent e274309d92
commit b8225d27fc
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -9,28 +9,35 @@
# #
################################################# #################################################
cmake_minimum_required( VERSION 2.8 ) cmake_minimum_required( VERSION 3.1 )
##### general package setup ##################### ##### general package setup #####################
project( tdebluez ) project( tdebluez )
set( PACKAGE tdebluez ) set( PACKAGE tdebluez )
set( VERSION R14.1.0 )
##### include essential cmake modules ########### ##### include essential cmake modules ###########
include( FindPkgConfig ) include( FindPkgConfig )
include( CheckFunctionExists )
include( CheckSymbolExists )
include( CheckIncludeFile ) include( CheckIncludeFile )
include( CheckTypeSize ) include( CheckLibraryExists )
include( CheckCSourceCompiles ) include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles ) include( CheckCXXSourceCompiles )
include( CheckLibraryExists )
##### include our cmake modules ################# ##### include our cmake modules #################
include( TDEMacros ) include( TDEMacros )
##### set version number ########################
tde_set_project_version( )
##### setup install paths ####################### ##### setup install paths #######################
include( TDESetupPaths ) include( TDESetupPaths )
tde_setup_paths( ) tde_setup_paths( )
@ -49,24 +56,34 @@ add_custom_target(install-apidox
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/") WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/cmake/")
##### optional stuff ############################ ##### optional stuff ############################
option( WITH_ALL_OPTIONS "Enable all optional support" OFF ) 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 #################### ##### user requested modules ####################
option( BUILD_ALL "Build all" ON )
option( BUILD_LIBTDEBLUEZ "Build libtdebluez" ON ) option( BUILD_ALL "Build all" OFF )
option( BUILD_LIBTDEBLUEZ "Build libtdebluez" ${BUILD_ALL} )
option( BUILD_TDEIOSLAVE "Build tdeioslave" ${BUILD_ALL} ) option( BUILD_TDEIOSLAVE "Build tdeioslave" ${BUILD_ALL} )
option( BUILD_DOC "Build doc" ${BUILD_ALL} ) option( BUILD_DOC "Build doc" ${BUILD_ALL} )
##### configure checks ########################## ##### configure checks ##########################
# if configure checks need be executed
include( ConfigureChecks.cmake ) include( ConfigureChecks.cmake )
###### global compiler settings #################
add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
#-Wl,--whole-archive
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
##### activate dependencies #####################
##### source directories ########################
add_subdirectory( src/tdebluez-common ) add_subdirectory( src/tdebluez-common )
add_subdirectory( src/libtdebluez ) add_subdirectory( src/libtdebluez )
add_subdirectory( src/libtdeobex ) add_subdirectory( src/libtdeobex )
@ -75,5 +92,11 @@ add_subdirectory( src/tdeioslave )
add_subdirectory( src/tdebluez ) add_subdirectory( src/tdebluez )
add_subdirectory( src/tdebluezauth ) add_subdirectory( src/tdebluezauth )
tde_conditional_add_subdirectory( BUILD_DOC doc ) ##### other data ################################
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
tde_conditional_add_project_docs( BUILD_DOC )
##### write configure files #####################
configure_file( config.h.cmake config.h @ONLY )

@ -14,24 +14,14 @@ tde_setup_architecture_flags( )
include(TestBigEndian) include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN) test_big_endian(WORDS_BIGENDIAN)
##### check for gcc visibility support ######### tde_setup_largefiles( )
# FIXME
# This should check for [T]Qt3 visibility support
if( WITH_GCC_VISIBILITY )
if( NOT UNIX )
tde_message_fatal(FATAL_ERROR "\ngcc visibility support was requested, but your system is not *NIX" )
endif( NOT UNIX )
set( __KDE_HAVE_GCC_VISIBILITY 1 )
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
endif( )
##### check for gcc visibility support
### if( WITH_GCC_VISIBILITY )
# some if then blocks come here tde_setup_gcc_visibility( )
# to handle submodules endif( WITH_GCC_VISIBILITY )
###
# check for dbus-1 # check for dbus-1
pkg_search_module( DBUS dbus-1 ) pkg_search_module( DBUS dbus-1 )

@ -0,0 +1,8 @@
#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@

2
debian/control vendored

@ -3,7 +3,7 @@ Section: tde
Priority: optional Priority: optional
Maintainer: Debian TDE Team <deloptes@gmail.com> Maintainer: Debian TDE Team <deloptes@gmail.com>
Uploaders: ... Uploaders: ...
Build-Depends: cdbs, debhelper (>= 9~), quilt, cmake-trinity, ninja-build, tdelibs14-trinity-dev, libdbus-1-tqt-dev, libdbus-1-3 (>= 1.10.26) Build-Depends: cdbs, debhelper (>= 9~), quilt, tde-cmake, ninja-build, tdelibs14-trinity-dev, libdbus-1-tqt-dev, libdbus-1-3 (>= 1.10.26)
Standards-Version: 3.8.0 Standards-Version: 3.8.0
#Vcs-Svn: svn://svn.debian.org/pkg-kde/kde-extras/kdebluetooth/trunk/ #Vcs-Svn: svn://svn.debian.org/pkg-kde/kde-extras/kdebluetooth/trunk/
#Vcs-Browser: http://svn.debian.org/wsvn/pkg-kde/kde-extras/kdebluetooth/trunk/ #Vcs-Browser: http://svn.debian.org/wsvn/pkg-kde/kde-extras/kdebluetooth/trunk/

@ -2,4 +2,4 @@ opt/trinity/lib/libtdebluez.so.0
opt/trinity/lib/libtdebluez.so.0.0.1 opt/trinity/lib/libtdebluez.so.0.0.1
opt/trinity/lib/libtdebluez.so opt/trinity/lib/libtdebluez.so
opt/trinity/lib/libtdebluez.la opt/trinity/lib/libtdebluez.la
etc/trinity/dbus-1/system.d/org.trinitydesktop.tdebluez.conf /etc/dbus-1/system.d/ /etc/dbus-1/system.d/org.trinitydesktop.tdebluez.conf

2
debian/rules vendored

@ -8,7 +8,7 @@ DEB_CMAKE_EXTRA_FLAGS := \
-DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \ -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" \
-DCMAKE_INSTALL_PREFIX="/opt/trinity" \ -DCMAKE_INSTALL_PREFIX="/opt/trinity" \
-DCONFIG_INSTALL_DIR="/etc/trinity" \ -DCONFIG_INSTALL_DIR="/etc/trinity" \
-DSYSCONF_INSTALL_DIR="/etc/trinity" \ -DSYSCONF_INSTALL_DIR="/etc" \
-DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \ -DXDG_MENU_INSTALL_DIR="/etc/xdg/menus" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_VERBOSE_MAKEFILE="ON" \ -DCMAKE_VERBOSE_MAKEFILE="ON" \

@ -26,6 +26,8 @@
#if !defined(ADAPTERIMPL_H_INCLUDED) #if !defined(ADAPTERIMPL_H_INCLUDED)
#define ADAPTERIMPL_H_INCLUDED #define ADAPTERIMPL_H_INCLUDED
#include "kdemacros.h"
#include "interfaces/adapter1Proxy.h" #include "interfaces/adapter1Proxy.h"
using namespace org::bluez; using namespace org::bluez;
@ -33,7 +35,7 @@ using namespace org::bluez;
namespace TDEBluetooth namespace TDEBluetooth
{ {
class AdapterImpl: public Adapter1Proxy class KDE_EXPORT AdapterImpl: public Adapter1Proxy
{ {
Q_OBJECT Q_OBJECT

@ -38,7 +38,7 @@
namespace TDEBluetooth namespace TDEBluetooth
{ {
class DeviceImpl: public org::bluez::Device1Proxy class KDE_EXPORT DeviceImpl: public org::bluez::Device1Proxy
{ {
Q_OBJECT Q_OBJECT

@ -34,7 +34,7 @@ namespace TDEBluetooth
/** /**
@author Fred Schaettgen @author Fred Schaettgen
*/ */
class DeviceMimeConverter class KDE_EXPORT DeviceMimeConverter
{ {
public: public:
static TQString classToMimeType(int deviceClass); static TQString classToMimeType(int deviceClass);

@ -48,7 +48,7 @@
namespace TDEBluetooth namespace TDEBluetooth
{ {
class ObjectManagerImpl : public org::freedesktop::DBus::ObjectManagerProxy class KDE_EXPORT ObjectManagerImpl : public org::freedesktop::DBus::ObjectManagerProxy
{ {
Q_OBJECT Q_OBJECT

@ -41,7 +41,7 @@ namespace TDEObex
#define DBUS_CONN_NAME "TDEBluezObex" #define DBUS_CONN_NAME "TDEBluezObex"
class ObexObjectManagerImpl: public org::freedesktop::DBus::ObjectManagerProxy class KDE_EXPORT ObexObjectManagerImpl: public org::freedesktop::DBus::ObjectManagerProxy
{ {
Q_OBJECT Q_OBJECT

Loading…
Cancel
Save