Build tdehw library as a standalone library.

This causes tdecore API change!

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/134/head
Slávek Banko 4 years ago
parent 44ad339260
commit c7b651a6ca
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -17,7 +17,6 @@ add_subdirectory( tests )
if( WITH_TDEHWLIB )
add_subdirectory( tdehw )
set( TDEHW_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tdehw )
set( TDEHW_LIB tdehw-static )
endif( WITH_TDEHWLIB )
if( WITH_LIBART )
@ -140,8 +139,8 @@ set( ${target}_SRCS
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION 14.0.0
EMBED tdecorenetwork-static ${TDEHW_LIB}
VERSION 14.1.0
EMBED tdecorenetwork-static
LINK DCOP-shared tdefx-shared ICE SM ${ZLIB_LIBRARIES}
LINK_PRIVATE ltdlc-static ${KDESVGICONS} ${XCOMPOSITE_LIBRARIES}
${LIBIDN_LIBRARIES} ${LIBBFD_LIBRARIES} ${LIB_UTIL} ${GAMIN_LIBRARIES}

@ -25,6 +25,8 @@
#include "kcharsets.h"
#include "kiconloader.h"
#ifdef __TDE_HAVE_TDEHWLIB
#include "klibloader.h"
#include "tdeversion.h"
#include "tdehardwaredevices.h"
#include "tdenetworkconnections.h"
#endif
@ -286,8 +288,18 @@ TDEIconLoader *TDEInstance::iconLoader() const
TDEHardwareDevices *TDEInstance::hardwareDevices() const
{
DEBUG_CHECK_ALIVE
if( _hardwaredevices == 0 ) {
_hardwaredevices = new TDEHardwareDevices( );
if (_hardwaredevices == 0)
{
TQString libName = TQString("libtdehw.so.%1").arg(TDE_VERSION_MAJOR);
KLibrary *lib = KLibLoader::self()->library(libName.latin1());
if (lib)
{
TDEHardwareDevices* (*create)() = (TDEHardwareDevices* (*)())lib->symbol("create_tdeHardwareDevices");
if (create)
{
_hardwaredevices = create();
}
}
}
return _hardwaredevices;
@ -296,8 +308,18 @@ TDEHardwareDevices *TDEInstance::hardwareDevices() const
TDEGlobalNetworkManager *TDEInstance::networkManager() const
{
DEBUG_CHECK_ALIVE
if( _networkmanager == 0 ) {
_networkmanager = new TDEGlobalNetworkManager( );
if (_networkmanager == 0)
{
TQString libName = TQString("libtdehw.so.%1").arg(TDE_VERSION_MAJOR);
KLibrary *lib = KLibLoader::self()->library(libName.latin1());
if (lib)
{
TDEGlobalNetworkManager* (*create)() = (TDEGlobalNetworkManager* (*)())lib->symbol("create_tdeGlobalNetworkManager");
if (create)
{
_networkmanager = create();
}
}
}
return _networkmanager;

@ -124,7 +124,9 @@ set( ${target}_SRCS
disksHelper.cpp
)
tde_add_library( ${target} STATIC_PIC AUTOMOC
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
LINK udev ${TDENM_LIBRARIES} ${TDEUPOWER_LIBRARIES} ${TDEHW_CUSTOM_LIBRARIES}
VERSION 14.1.0
LINK_PRIVATE udev tdecore-shared ${TDENM_LIBRARIES} ${TDEUPOWER_LIBRARIES} ${TDEHW_CUSTOM_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)

@ -119,6 +119,13 @@ unsigned int reverse_bits(unsigned int x)
// Helper function implemented in tdestoragedevice.cpp
TQString decodeHexEncoding(TQString str);
extern "C" {
KDE_EXPORT TDEHardwareDevices* create_tdeHardwareDevices()
{
return new TDEHardwareDevices();
}
}
TDEHardwareDevices::TDEHardwareDevices() {
// Initialize members
pci_id_map = 0;

@ -40,6 +40,13 @@
/* TDENetworkSearchDomain */
/*================================================================================================*/
extern "C" {
KDE_EXPORT TDEGlobalNetworkManager* create_tdeGlobalNetworkManager()
{
return new TDEGlobalNetworkManager();
}
}
TDENetworkSearchDomain::TDENetworkSearchDomain() {
m_isIPV6 = false;
}

Loading…
Cancel
Save