summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2023-04-24 20:57:15 +0200
committerSlávek Banko <slavek.banko@axis.cz>2023-04-24 20:57:15 +0200
commitfadb46f704506567b42aab2eeedf8f8947dd3e40 (patch)
treeb9306966aa8cef8cccc749cb2d030785381a33a3
parentb06473f57454826244750cb920ded523d0bc6a94 (diff)
downloadtdebluez-fadb46f704506567b42aab2eeedf8f8947dd3e40.tar.gz
tdebluez-fadb46f704506567b42aab2eeedf8f8947dd3e40.zip
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>
-rw-r--r--ConfigureChecks.cmake32
-rw-r--r--src/libtdebluez/CMakeLists.txt21
-rw-r--r--src/libtdebluez/interfaces/CMakeLists.txt31
-rw-r--r--src/libtdeobex/CMakeLists.txt23
-rw-r--r--src/libtdeobex/interfaces/CMakeLists.txt24
5 files changed, 30 insertions, 101 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index bc3c9ea..0df3cea 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -9,6 +9,12 @@
#
#################################################
+
+# required stuff
+find_package( TQt )
+find_package( TDE )
+find_package( TQtQUI )
+
tde_setup_architecture_flags( )
include(TestBigEndian)
@@ -23,27 +29,5 @@ if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY )
-# check for dbus-1
-pkg_search_module( DBUS dbus-1 )
-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 )
+# check for dbus
+tde_setup_dbus( dbus-1-tqt )
diff --git a/src/libtdebluez/CMakeLists.txt b/src/libtdebluez/CMakeLists.txt
index af33393..9c040d4 100644
--- a/src/libtdebluez/CMakeLists.txt
+++ b/src/libtdebluez/CMakeLists.txt
@@ -12,19 +12,6 @@
project( libtdebluez )
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 )
include_directories(
@@ -42,8 +29,10 @@ link_directories(
${DBUS_TQT_LIBRARY_DIRS}
)
+
##### headers ###################################
# implementations
+
install(
FILES adapterImpl.h
btuuids.h
@@ -84,14 +73,16 @@ set( ${target}_SRCS
)
##### tdebluez (shared) ###########################
-# set( KDE3_DCOPIDL_EXECUTABLE ${KDE3_DCOPIDLNG_EXECUTABLE} )
+
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION ${LIBRARY_VERSION}
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}
)
+
##### install import cmake modules ###############
+
tde_install_export( )
diff --git a/src/libtdebluez/interfaces/CMakeLists.txt b/src/libtdebluez/interfaces/CMakeLists.txt
index 4eba55d..15a6587 100644
--- a/src/libtdebluez/interfaces/CMakeLists.txt
+++ b/src/libtdebluez/interfaces/CMakeLists.txt
@@ -16,7 +16,6 @@ include_directories(
)
set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces )
-set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 )
set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h )
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_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 #########################
add_custom_command(
@@ -92,25 +84,10 @@ tde_add_library( bluezinterfaces STATIC_PIC AUTOMOC
##### install headers ###################################
-
-#file( GLOB _bin_dirs RELATIVE ${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}
+install(
+ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DESTINATION ${INCLUDE_INSTALL_DIR}/tdebluez
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN PATTERN "*.h"
- PATTERN "CMakeFiles" EXCLUDE)
+ PATTERN "CMakeFiles" EXCLUDE
+)
diff --git a/src/libtdeobex/CMakeLists.txt b/src/libtdeobex/CMakeLists.txt
index b4323c8..3c6bd51 100644
--- a/src/libtdeobex/CMakeLists.txt
+++ b/src/libtdeobex/CMakeLists.txt
@@ -12,19 +12,6 @@
project( libtdeobex )
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 )
include_directories(
@@ -42,8 +29,10 @@ link_directories(
${DBUS_TQT_LIBRARY_DIRS}
)
+
##### headers ###################################
# implementations
+
install(
FILES obexobjectmanagerImpl.h
DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex )
@@ -54,14 +43,16 @@ set( ${target}_SRCS obexobjectmanagerImpl.cpp )
##### tdeobex (shared) ###########################
-# set( KDE3_DCOPIDL_EXECUTABLE ${KDE3_DCOPIDLNG_EXECUTABLE} )
+
tde_add_library( ${target} SHARED AUTOMOC
SOURCES ${${target}_SRCS}
VERSION ${LIBRARY_VERSION}
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}
)
-
+
+
##### install import cmake modules ###############
+
tde_install_export( )
diff --git a/src/libtdeobex/interfaces/CMakeLists.txt b/src/libtdeobex/interfaces/CMakeLists.txt
index 9c09e24..c93ec00 100644
--- a/src/libtdeobex/interfaces/CMakeLists.txt
+++ b/src/libtdeobex/interfaces/CMakeLists.txt
@@ -16,7 +16,6 @@ include_directories(
)
set( INTROSPECTIONPATH ${CMAKE_SOURCE_DIR}/src/interfaces )
-set( DBUSXML2QT3_EXECUTABLE dbusxml2qt3 )
set( ObjectManager_HDRS objectmanagerInterface.h objectmanagerProxy.h introspectableInterface.h )
set( ObjectManager_SRCS objectmanagerInterface.cpp objectmanagerProxy.cpp introspectableInterface.cpp )
@@ -59,26 +58,13 @@ tde_add_library( obexinterfaces STATIC_PIC AUTOMOC
LINK ${DBUS_TQT_LIBRARIES}
)
-##### headers ###################################
-#file( GLOB _bin_dirs RELATIVE ${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}
-#)
+##### headers ###################################
-install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+install(
+ DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DESTINATION ${INCLUDE_INSTALL_DIR}/tdeobex
USE_SOURCE_PERMISSIONS
FILES_MATCHING PATTERN PATTERN "*.h"
- PATTERN "CMakeFiles" EXCLUDE )
+ PATTERN "CMakeFiles" EXCLUDE
+)