Use find_package( TQtQUI ) to detect TQtQui library.

Use tde_setup_dbus to detect and setup DBus.
Cleanup unused macros.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/19/head
Slávek Banko 1 year ago
parent b06473f574
commit fadb46f704
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -9,6 +9,12 @@
# #
################################################# #################################################
# required stuff
find_package( TQt )
find_package( TDE )
find_package( TQtQUI )
tde_setup_architecture_flags( ) tde_setup_architecture_flags( )
include(TestBigEndian) include(TestBigEndian)
@ -23,27 +29,5 @@ if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( ) tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY ) endif( WITH_GCC_VISIBILITY )
# check for dbus-1 # check for dbus
pkg_search_module( DBUS dbus-1 ) tde_setup_dbus( dbus-1-tqt )
if( NOT DBUS_FOUND )
tde_message_fatal( "dbus-1 is required, but was not found on your system" )
endif( )
# check for dbus-1-tqt
pkg_search_module( DBUS_TQT dbus-1-tqt )
if( NOT DBUS_TQT_FOUND )
tde_message_fatal( "dbus-1-tqt is required, but was not found on your system" )
endif( )
# check for msgfmt
if( BUILD_TRANSLATIONS AND NOT DEFINED MSGFMT_EXECUTABLE )
find_program( MSGFMT_EXECUTABLE msgfmt )
if( NOT MSGFMT_EXECUTABLE )
tde_message_fatal( "msgfmt program is required, but was not found on your system" )
endif( )
endif( )
# required stuff
find_package( TQt )
find_package( TDE )

@ -12,19 +12,6 @@
project( libtdebluez ) project( libtdebluez )
set(LIBRARY_VERSION 0.0.1) set(LIBRARY_VERSION 0.0.1)
# include( ConfigureChecks.cmake )
foreach( f ${TQT_LIBRARIES} )
if( ${f} STREQUAL "tqt-mt" )
set(TQUI_LIBRARIES "tqui" CACHE TYPE STRING FORCE)
endif()
if( ${f} STREQUAL "qt-mt" )
set(TQUI_LIBRARIES "qui" CACHE TYPE STRING FORCE)
endif()
endforeach()
# import required
#tde_import( lib... )
add_subdirectory( interfaces ) add_subdirectory( interfaces )
include_directories( include_directories(
@ -42,8 +29,10 @@ link_directories(
${DBUS_TQT_LIBRARY_DIRS} ${DBUS_TQT_LIBRARY_DIRS}
) )
##### headers ################################### ##### headers ###################################
# implementations # implementations
install( install(
FILES adapterImpl.h FILES adapterImpl.h
btuuids.h btuuids.h
@ -84,14 +73,16 @@ set( ${target}_SRCS
) )
##### tdebluez (shared) ########################### ##### tdebluez (shared) ###########################
# set( KDE3_DCOPIDL_EXECUTABLE ${KDE3_DCOPIDLNG_EXECUTABLE} )
tde_add_library( ${target} SHARED AUTOMOC tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS} SOURCES ${${target}_SRCS}
VERSION ${LIBRARY_VERSION} VERSION ${LIBRARY_VERSION}
DEPENDS bluezinterfaces-static DEPENDS bluezinterfaces-static
LINK ${DBUS_TQT_LIBRARIES} tdeparts-shared bluezinterfaces-static ${TQUI_LIBRARIES} LINK ${DBUS_TQT_LIBRARIES} tdeparts-shared bluezinterfaces-static ${TQTQUI_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )
##### install import cmake modules ############### ##### install import cmake modules ###############
tde_install_export( ) tde_install_export( )

@ -16,7 +16,6 @@ include_directories(
) )
set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces ) set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces )
set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 )
set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h ) set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h )
set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp) set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp)
@ -33,13 +32,6 @@ set( Adapter_SRCS adapter1Interface.cpp adapter1Proxy.cpp gattmanager1Interface.
set( Device_HDRS device1Interface.h device1Proxy.h mediacontrol1Interface.h mediacontrol1Proxy.h) set( Device_HDRS device1Interface.h device1Proxy.h mediacontrol1Interface.h mediacontrol1Proxy.h)
set( Device_SRCS device1Interface.cpp device1Proxy.cpp mediacontrol1Interface.cpp mediacontrol1Proxy.cpp ) set( Device_SRCS device1Interface.cpp device1Proxy.cpp mediacontrol1Interface.cpp mediacontrol1Proxy.cpp )
#function( install_header fileinput target )
# install(
# FILES ${CMAKE_CURRENT_BUILD_DIR}/${fileinput}
# DESTINATION ${target}
# )
#endfunction( )
##### ObjectManager ######################### ##### ObjectManager #########################
add_custom_command( add_custom_command(
@ -92,25 +84,10 @@ tde_add_library( bluezinterfaces STATIC_PIC AUTOMOC
##### install headers ################################### ##### install headers ###################################
install(
#file( GLOB _bin_dirs RELATIVE ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
#      ${CMAKE_CURRENT_BINARY_DIR}/* )
#unset( _exclude_dirs )
#foreach( _dir IN LISTS _bin_dirs )
#  if(IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir} )
#    list( APPEND _exclude_dirs PATTERN ${_dir} EXCLUDE )
#  endif()
#endforeach()
#
#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
# DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex
# USE_SOURCE_PERMISSIONS
# FILES_MATCHING PATTERN PATTERN "*.h"
# ${_exclude_dirs}
#)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DESTINATION ${INCLUDE_INSTALL_DIR}/tdebluez DESTINATION ${INCLUDE_INSTALL_DIR}/tdebluez
USE_SOURCE_PERMISSIONS USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN PATTERN "*.h" FILES_MATCHING PATTERN PATTERN "*.h"
PATTERN "CMakeFiles" EXCLUDE) PATTERN "CMakeFiles" EXCLUDE
)

@ -12,19 +12,6 @@
project( libtdeobex ) project( libtdeobex )
set(LIBRARY_VERSION 0.0.1) set(LIBRARY_VERSION 0.0.1)
# include( ConfigureChecks.cmake )
foreach( f ${TQT_LIBRARIES} )
if( ${f} STREQUAL "tqt-mt" )
set(TQUI_LIBRARIES "tqui" CACHE TYPE STRING FORCE)
endif()
if( ${f} STREQUAL "qt-mt" )
set(TQUI_LIBRARIES "qui" CACHE TYPE STRING FORCE)
endif()
endforeach()
# import required
#tde_import( lib... )
add_subdirectory( interfaces ) add_subdirectory( interfaces )
include_directories( include_directories(
@ -42,8 +29,10 @@ link_directories(
${DBUS_TQT_LIBRARY_DIRS} ${DBUS_TQT_LIBRARY_DIRS}
) )
##### headers ################################### ##### headers ###################################
# implementations # implementations
install( install(
FILES obexobjectmanagerImpl.h FILES obexobjectmanagerImpl.h
DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex ) DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex )
@ -54,14 +43,16 @@ set( ${target}_SRCS obexobjectmanagerImpl.cpp )
##### tdeobex (shared) ########################### ##### tdeobex (shared) ###########################
# set( KDE3_DCOPIDL_EXECUTABLE ${KDE3_DCOPIDLNG_EXECUTABLE} )
tde_add_library( ${target} SHARED AUTOMOC tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS} SOURCES ${${target}_SRCS}
VERSION ${LIBRARY_VERSION} VERSION ${LIBRARY_VERSION}
DEPENDS obexinterfaces-static DEPENDS obexinterfaces-static
LINK ${DBUS_TQT_LIBRARIES} tdeparts-shared obexinterfaces-static ${TQUI_LIBRARIES} LINK ${DBUS_TQT_LIBRARIES} tdeparts-shared obexinterfaces-static ${TQTQUI_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR} DESTINATION ${LIB_INSTALL_DIR}
) )
##### install import cmake modules ############### ##### install import cmake modules ###############
tde_install_export( ) tde_install_export( )

@ -16,7 +16,6 @@ include_directories(
) )
set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces ) set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces )
set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 )
set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h ) set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h )
set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp ) set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp )
@ -59,26 +58,13 @@ tde_add_library( obexinterfaces STATIC_PIC AUTOMOC
LINK ${DBUS_TQT_LIBRARIES} LINK ${DBUS_TQT_LIBRARIES}
) )
##### headers ###################################
#file( GLOB _bin_dirs RELATIVE ${CMAKE_CURRENT_BINARY_DIR} ##### headers ###################################
#      ${CMAKE_CURRENT_BINARY_DIR}/* )
#unset( _exclude_dirs )
#foreach( _dir IN LISTS _bin_dirs )
#  if( IS_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${_dir} )
#    list( APPEND _exclude_dirs PATTERN ${_dir} EXCLUDE )
#  endif()
#endforeach()
#
#install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
# DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex
# USE_SOURCE_PERMISSIONS
# FILES_MATCHING PATTERN PATTERN "*.h"
# ${_exclude_dirs}
#)
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex
USE_SOURCE_PERMISSIONS USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN PATTERN "*.h" FILES_MATCHING PATTERN PATTERN "*.h"
PATTERN "CMakeFiles" EXCLUDE ) PATTERN "CMakeFiles" EXCLUDE
)

Loading…
Cancel
Save