From 3de856e262fea826e0dc5197aa08c454f0112dca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20H=C3=B6ger?= Date: Sat, 16 Jun 2012 16:54:53 +0200 Subject: [PATCH 08/14] Find DbusBasicValue Emulate autoconf check --- CMakeLists.txt | 12 ++++++++---- config.h.cmake | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc8548b..0d60efe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,11 +11,16 @@ set(PACKAGE_VERSION "1.1.0") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}") -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) -include_directories(${CMAKE_CURRENT_BINARY_DIR}) +include (CheckTypeSize) #DBUS find_package(DBUS REQUIRED) +include_directories(${DBUS_INCLUDES}) +set(CMAKE_EXTRA_INCLUDE_FILES "") +check_type_size(DBusBasicValue DBUSBASICVALUE) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) #GLIB find_package(GLIB REQUIRED) @@ -52,8 +57,7 @@ execute_process( string(REPLACE "\n" "" site_pkg ${site_pkg}) message(STATUS "Python module path is: ${site_pkg}") -include_directories(include/ ${PYTHON_INCLUDE_DIRS} ${DBUS_INCLUDES}) - +include_directories(include/ ${PYTHON_INCLUDE_DIRS}) include_directories(_dbus_bindings/) file(GLOB dbus_binding_sources _dbus_bindings/*.c) add_library(_dbus_bindings SHARED ${dbus_binding_sources}) diff --git a/config.h.cmake b/config.h.cmake index 2eeefd1..ebb33c2 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -72,3 +72,6 @@ /* Version number of package */ #cmakedefine VERSION "@VERSION@" + +/* Do we have DBusBasicValue? */ +#cmakedefine HAVE_DBUSBASICVALUE -- 1.7.10