Commit 36ebfd41 authored by Ralf Habacker's avatar Ralf Habacker

* cmake: new directory, contains cmake build support.

See http://www.cmake.org for more informations.
Currently only unix will be buildable because some
win32 required files are still missing.
parent 4ceb86d2
2007-03-03 Ralf Habacker <ralf.habacker@freenet.de>
* cmake: new directory, contains cmake build support.
See http://www.cmake.org for more informations.
Currently only unix will be buildable because some
win32 required files are still missing.
2007-03-03 Thiago Macieira <thiago@kde.org>
* dbus/dbus-sysdeps-unix.c: capture the dbus-launch stderr
......
This diff is collapsed.
include(CheckIncludeFile)
include(CheckSymbolExists)
include(CheckStructMember)
include(CheckTypeSize)
check_include_file(dirent.h HAVE_DIRENT_H) # dbus-sysdeps-util.c
check_include_file(io.h HAVE_IO_H) # internal
check_include_file(grp.h HAVE_GRP_H) # dbus-sysdeps-util-win.c
check_include_file(sys/poll.h HAVE_POLL) # dbus-sysdeps.c, dbus-sysdeps-win.c
check_include_file(sys/time.h HAVE_SYS_TIME_H)# dbus-sysdeps-win.c
check_include_file(sys/wait.h HAVE_SYS_WAIT_H)# dbus-sysdeps-win.c
check_include_file(time.h HAVE_TIME_H) # dbus-sysdeps-win.c
check_include_file(unistd.h HAVE_UNISTD_H) # dbus-sysdeps-util-win.c
check_include_file(stdio.h HAVE_STDIO_H) # dbus-sysdeps.h
check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) # dbus-sysdeps.c, dbus-sysdeps-win.c
check_symbol_exists(getgrouplist "grp.h" HAVE_GETGROUPLIST) # dbus-sysdeps.c
check_symbol_exists(getpeerucred "ucred.h" HAVE_GETPEERUCRED) # dbus-sysdeps.c, dbus-sysdeps-win.c
check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP) # dbus-sysdeps.c
check_symbol_exists(getpwnam_r "errno.h pwd.h" HAVE_POSIX_GETPWNAM_R) # dbus-sysdeps-util-unix.c
check_symbol_exists(setenv "stdlib.h" HAVE_SETENV) # dbus-sysdeps.c
check_symbol_exists(socketpair "sys/socket.h.h" HAVE_SOCKETPAIR) # dbus-sysdeps.c
check_symbol_exists(unsetenv "stdlib.h" HAVE_UNSETENV) # dbus-sysdeps.c
check_symbol_exists(writev "sys/uio.h" HAVE_WRITEV) # dbus-sysdeps.c, dbus-sysdeps-win.c
check_struct_member(cmsgcred cmcred_pid "sys/types.h sys/socket.h" HAVE_CMSGCRED) # dbus-sysdeps.c
# missing:
# HAVE_ABSTRACT_SOCKETS
# DBUS_HAVE_GCC33_GCOV
check_type_size("short" SIZEOF_SHORT)
check_type_size("int" SIZEOF_INT)
check_type_size("long" SIZEOF_LONG)
check_type_size("long long" SIZEOF_LONG_LONG)
check_type_size("__int64" SIZEOF___INT64)
# DBUS_INT64_TYPE
if(SIZEOF_INT EQUAL 8)
set (DBUS_HAVE_INT64 1)
set (DBUS_INT64_TYPE "int")
else(SIZEOF_INT EQUAL 8)
if(SIZEOF_LONG EQUAL 8)
set (DBUS_HAVE_INT64 1)
set (DBUS_INT64_TYPE "long")
else(SIZEOF_LONG EQUAL 8)
if(SIZEOF_LONG_LONG EQUAL 8)
set (DBUS_HAVE_INT64 1)
set (DBUS_INT64_TYPE "long long")
else(SIZEOF_LONG_LONG EQUAL 8)
if(SIZEOF___INT64 EQUAL 8)
set (DBUS_HAVE_INT64 1)
set (DBUS_INT64_TYPE "__int64")
endif(SIZEOF___INT64 EQUAL 8)
endif(SIZEOF_LONG_LONG EQUAL 8)
endif(SIZEOF_LONG EQUAL 8)
endif(SIZEOF_INT EQUAL 8)
# DBUS_INT32_TYPE
if(SIZEOF_INT EQUAL 4)
set (DBUS_INT32_TYPE "int")
else(SIZEOF_INT EQUAL 4)
if(SIZEOF_LONG EQUAL 4)
set (DBUS_INT32_TYPE "long")
else(SIZEOF_LONG EQUAL 4)
if(SIZEOF_LONG_LONG EQUAL 4)
set (DBUS_INT32_TYPE "long long")
endif(SIZEOF_LONG_LONG EQUAL 4)
endif(SIZEOF_LONG EQUAL 4)
endif(SIZEOF_INT EQUAL 4)
# DBUS_INT16_TYPE
if(SIZEOF_INT EQUAL 2)
set (DBUS_INT16_TYPE "int")
else(SIZEOF_INT EQUAL 2)
if(SIZEOF_SHORT EQUAL 2)
set (DBUS_INT16_TYPE "short")
endif(SIZEOF_SHORT EQUAL 2)
endif(SIZEOF_INT EQUAL 2)
find_program(DOXYGEN doxygen)
find_program(XMLTO xmlto)
write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" "#include <stdarg.h>
void f (int i, ...) {
va_list args1, args2;
va_start (args1, i);
va_copy (args2, args1);
if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
exit (1);
va_end (args1); va_end (args2);
}
int main() {
f (0, 42);
return 0;
}
")
try_compile(DBUS_HAVE_VA_COPY
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c)
if(DBUS_HAVE_VA_COPY)
SET(DBUS_VA_COPY va_copy CACHE STRING "va_copy function")
else(DBUS_HAVE_VA_COPY)
write_file("${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c" "#include <stdarg.h>
void f (int i, ...) {
va_list args1, args2;
va_start (args1, i);
__va_copy (args2, args1);
if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
exit (1);
va_end (args1); va_end (args2);
}
int main() {
f (0, 42);
return 0;
}
")
try_compile(DBUS_HAVE_VA_COPY
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/cmake_try_compile.c)
if(DBUS_HAVE___VA_COPY)
SET(DBUS_VA_COPY __va_copy CACHE STRING "va_copy function")
endif(DBUS_HAVE___VA_COPY)
endif(DBUS_HAVE_VA_COPY)
:: bus-test wrapper
@echo off
:: session bus address
set DBUS_STARTER_BUS=tcp:host=localhost,port=1234
if NOT "%1" == "" (
SET DATADIR=%1
) else (
SET DATADIR=test\data
)
bin\bus-test.exe test\data
include_directories(${CMAKE_SOURCE_DIR}/..)
include_directories( ${CMAKE_INCLUDE_PATH} )
add_definitions(-DDBUS_COMPILATION)
SET(EFENCE "")
SET(BUS_DIR ${CMAKE_SOURCE_DIR}/../bus)
set (config_DATA
session.conf
system.conf
)
# config files for installation
FOREACH(file ${config_DATA})
CONFIGURE_FILE( "${CMAKE_CURRENT_SOURCE_DIR}/${file}.cmake" "${CMAKE_CURRENT_BINARY_DIR}/${file}" IMMEDIATE @ONLY)
ENDFOREACH(file)
# copy services for local daemon start to local service dir data/dbus-1/services
SET (SERVICE_FILES test/data/valid-service-files)
FILE(GLOB FILES "${CMAKE_SOURCE_DIR}/../${SERVICE_FILES}/*.service.in" )
FOREACH(FILE ${FILES})
GET_FILENAME_COMPONENT(FILENAME ${FILE} NAME_WE)
SET (TARGET ${CMAKE_BINARY_DIR}/data/dbus-1/services/${FILENAME}.service)
IF (CONFIG_VERBOSE)
MESSAGE("FROM: ${FILE}\nTO: ${TARGET}\n")
ENDIF (CONFIG_VERBOSE)
configure_file(${FILE} ${TARGET} )
ENDFOREACH(FILE)
if(DBUS_USE_EXPAT)
SET (XML_SOURCES ${BUS_DIR}/config-loader-expat.c)
else(DBUS_USE_EXPAT)
SET (XML_SOURCES ${BUS_DIR}/config-loader-libxml.c)
endif (DBUS_USE_EXPAT)
# after next cvs update
#set (DIR_WATCH_SOURCE ${BUS_DIR}/dir-watch-default.c)
set (DIR_WATCH_SOURCE )
set (BUS_SOURCES
${BUS_DIR}/activation.c
${BUS_DIR}/activation.h
${BUS_DIR}/bus.c
${BUS_DIR}/bus.h
${BUS_DIR}/config-parser.c
${BUS_DIR}/config-parser.h
${BUS_DIR}/connection.c
${BUS_DIR}/connection.h
${BUS_DIR}/desktop-file.c
${BUS_DIR}/desktop-file.h
${BUS_DIR}/dir-watch.c
${BUS_DIR}/dir-watch.h
${BUS_DIR}/dispatch.c
${BUS_DIR}/dispatch.h
${BUS_DIR}/driver.c
${BUS_DIR}/driver.h
${BUS_DIR}/expirelist.c
${BUS_DIR}/expirelist.h
${BUS_DIR}/policy.c
${BUS_DIR}/policy.h
${BUS_DIR}/selinux.h
${BUS_DIR}/selinux.c
${BUS_DIR}/services.c
${BUS_DIR}/services.h
${BUS_DIR}/signals.c
${BUS_DIR}/signals.h
${BUS_DIR}/test.c
${BUS_DIR}/test.h
${BUS_DIR}/utils.c
${BUS_DIR}/utils.h
${XML_SOURCES}
${DIR_WATCH_SOURCE}
)
set (dbus_daemon_SOURCES
${BUS_SOURCES}
${BUS_DIR}/main.c
)
include_directories(${XML_INCLUDE_DIR})
SET (LIBS ${XML_LIBRARY})
add_executable(dbus-daemon ${dbus_daemon_SOURCES})
target_link_libraries(dbus-daemon dbus-1 ${LIBS})
install_targets(/bin dbus-daemon )
install_files(/etc FILES ${config_DATA})
if (DBUS_SERVICE)
set (dbus_service_SOURCES
${BUS_DIR}/bus-service-win.c
# TODO: add additional files
# ${BUS_DIR}/service-main.c
# ${BUS_SOURCES}
)
add_executable(dbus-service ${dbus_service_SOURCES} )
target_link_libraries(dbus-service dbus-1 ${LIBS})
install_targets(/bin dbus-service )
endif (DBUS_SERVICE)
## note that TESTS has special meaning (stuff to use in make check)
## so if adding tests not to be run in make check, don't add them to
## TESTS
#if DBUS_BUILD_TESTS
#TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus
#TESTS=bus-test
#else
#TESTS=
#endif
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
#noinst_PROGRAMS=$(TESTS)
set (bus_test_SOURCES
${BUS_SOURCES}
${BUS_DIR}/test-main.c
)
if (DBUS_BUILD_TESTS)
add_executable(bus-test ${bus_test_SOURCES})
target_link_libraries(bus-test dbus-1 ${LIBS} )
install_targets(/bin bus-test)
add_test(bus-test ${EXECUTABLE_OUTPUT_PATH}/bus-test ${CMAKE_SOURCE_DIR}/../test/data)
endif (DBUS_BUILD_TESTS)
if(MSVC)
project_source_group(${GROUP_CODE} bus_test_SOURCES dummy)
endif(MSVC)
## mop up the gcov files
#clean-local:
# /bin/rm *.bb *.bbg *.da *.gcov || true
#install-data-hook:
# $(mkinstalldirs) $(DESTDIR)/$(localstatedir)/run/dbus
# $(mkinstalldirs) $(DESTDIR)/$(configdir)/system.d
# $(mkinstalldirs) $(DESTDIR)/$(datadir)/dbus-1/services
##install_file(${configdir}/system.d FILE
#### Init scripts fun
#SCRIPT_IN_FILES=messagebus.in
# rc.messagebus.in
## Red Hat start
#if DBUS_INIT_SCRIPTS_RED_HAT
#initddir=$(sysconfdir)/rc.d/init.d
#initd_SCRIPTS=
# messagebus
#endif
# ## Red Hat end
## Slackware start
#if DBUS_INIT_SCRIPTS_SLACKWARE
#initddir=$(sysconfdir)/rc.d/
#initd_SCRIPTS=
# rc.messagebus
#endif
## Slackware end
#MAN_IN_FILES=dbus-daemon.1.in
#man_MANS = dbus-daemon.1
#### Extra dist
#EXTRA_DIST=$(CONFIG_IN_FILES) $(SCRIPT_IN_FILES) $(man_MANS) $(MAN_IN_FILES)
[D-BUS Service]
Name=org.freedektop.DBus.ServiceName
Exec=notepad
<!-- This configuration file controls the per-user-login-session message bus.
Add a session-local.conf and edit that rather than changing this
file directly. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Our well-known bus type, don't change this -->
<type>session</type>
<listen>@DBUS_SESSION_BUS_DEFAULT_ADDRESS@</listen>
<standard_session_servicedirs />
<policy context="default">
<!-- Allow everything to be sent -->
<allow send_destination="*"/>
<!-- Allow everything to be received -->
<allow eavesdrop="true"/>
<!-- Allow anyone to own anything -->
<allow own="*"/>
</policy>
<!-- This is included last so local configuration can override what's
in this standard file -->
<include ignore_missing="yes">session-local.conf</include>
<include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>
</busconfig>
<!-- This configuration file controls the systemwide message bus.
Add a system-local.conf and edit that rather than changing this
file directly. -->
<!-- Note that there are any number of ways you can hose yourself
security-wise by screwing up this file; in particular, you
probably don't want to listen on any more addresses, add any more
auth mechanisms, run as a different user, etc. -->
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- Our well-known bus type, do not change this -->
<type>system</type>
<!-- Run as special user -->
<user>@DBUS_USER@</user>
<!-- Fork into daemon mode -->
<fork/>
<!-- Write a pid file -->
<pidfile>@DBUS_SYSTEM_PID_FILE@</pidfile>
<!-- Only allow socket-credentials-based authentication -->
<auth>EXTERNAL</auth>
<!-- Only listen on a local socket. (abstract=/path/to/socket
means use abstract namespace, don't really create filesystem
file; only Linux supports this. Use path=/whatever on other
systems.) -->
<listen>@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@</listen>
<policy context="default">
<!-- Deny everything then punch holes -->
<deny send_interface="*"/>
<deny receive_interface="*"/>
<deny own="*"/>
<!-- But allow all users to connect -->
<allow user="*"/>
<!-- Allow anyone to talk to the message bus -->
<!-- FIXME I think currently these allow rules are always implicit
even if they aren't in here -->
<allow send_destination="org.freedesktop.DBus"/>
<allow receive_sender="org.freedesktop.DBus"/>
<!-- valid replies are always allowed -->
<allow send_requested_reply="true"/>
<allow receive_requested_reply="true"/>
</policy>
<!-- Config files are placed here that among other things, punch
holes in the above policy for specific services. -->
<includedir>system.d</includedir>
<!-- This is included last so local configuration can override what's
in this standard file -->
<include ignore_missing="yes">system-local.conf</include>
<include if_selinux_enabled="yes" selinux_root_relative="yes">contexts/dbus_contexts</include>
</busconfig>
/* config.h. Generated by cmake from config.h.cmake */
#ifndef _DBUS_CONFIG_H
#define _DBUS_CONFIG_H
/****************************/
#cmakedefine HAVE_GNUC_VARARGS 1
#cmakedefine DBUS_CONSOLE_AUTH_DIR "@DBUS_CONSOLE_AUTH_DIR@"
#cmakedefine DBUS_DATADIR "@DBUS_DATADIR@"
#cmakedefine DBUS_BINDIR "@DBUS_BINDIR@"
#cmakedefine DBUS_SYSTEM_CONFIG_FILE "@DBUS_SYSTEM_CONFIG_FILE@"
#cmakedefine DBUS_SESSION_CONFIG_FILE "@DBUS_SESSION_CONFIG_FILE@"
#cmakedefine DAEMON_NAME "@DAEMON_NAME@"
#cmakedefine DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@"
#cmakedefine DBUS_MACHINE_UUID_FILE "@DBUS_MACHINE_UUID_FILE@"
//#cmakedefine DBUS_SESSION_BUS_DEFAULT_ADDRESS "@DBUS_SESSION_BUS_DEFAULT_ADDRESS@"
#cmakedefine PACKAGE "@PACKAGE@"
/* Version number of package */
#cmakedefine VERSION "@VERSION@"
// test binaries
/* Full path to test file test/test-exit in builddir */
#define TEST_EXIT_BINARY "@TEST_EXIT_BINARY@"
/* Full path to test file test/test-segfault in builddir */
#define TEST_SEGFAULT_BINARY "@TEST_SEGFAULT_BINARY@"
/* Full path to test file test/test-service in builddir */
#define TEST_SERVICE_BINARY "@TEST_SERVICE_BINARY@"
/* Full path to test file test/test-shell-service in builddir */
#define TEST_SHELL_SERVICE_BINARY "@TEST_SHELL_SERVICE_BINARY@"
/* Full path to test file test/test-sleep-forever in builddir */
#define TEST_SLEEP_FOREVER_BINARY "@TEST_SLEEP_FOREVER_BINARY@"
/* Some dbus features */
#cmakedefine DBUS_BUILD_TESTS 1
#cmakedefine DBUS_ENABLE_ANSI 1
#cmakedefine DBUS_ENABLE_VERBOSE_MODE 1
#cmakedefine DBUS_DISABLE_ASSERTS 1
#cmakedefine DBUS_DISABLE_CHECKS 1
/* xmldocs */
/* doxygen */
#cmakedefine DBUS_GCOV_ENABLED 1
/* abstract-sockets */
/* selinux */
#cmakedefine DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX 1
/* kqueue */
#cmakedefine HAVE_CONSOLE_OWNER_FILE 1
#define DBUS_CONSOLE_OWNER_FILE "@DBUS_CONSOLE_OWNER_FILE@"
#cmakedefine DBUS_HAVE_ATOMIC_INT 1
#cmakedefine DBUS_USE_ATOMIC_INT_486 1
#if (defined(__i386__) || defined(__x86_64__))
# define DBUS_HAVE_ATOMIC_INT 1
# define DBUS_USE_ATOMIC_INT_486 1
#endif
#cmakedefine DBUS_BUILD_X11 1
#cmakedefine DBUS_VA_COPY @DBUS_VA_COPY_FUNC@
// headers
/* Define to 1 if you have dirent.h */
#cmakedefine HAVE_DIRENT_H 1
/* Define to 1 if you have io.h */
#cmakedefine HAVE_IO_H 1
/* Define to 1 if you have grp.h */
#cmakedefine HAVE_GRP_H 1
/* Define to 1 if you have sys/poll.h */
#cmakedefine HAVE_POLL 1
/* Define to 1 if you have sys/time.h */
#cmakedefine HAVE_SYS_TIME 1
/* Define to 1 if you have sys/wait.h */
#cmakedefine HAVE_SYS_WAIT 1
/* Define to 1 if you have time.h */
#cmakedefine HAVE_TIME_H 1
/* Define to 1 if you have unistd.h */
#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have stdio.h */
#cmakedefine HAVE_STDIO_H 1
// symbols
/* Define to 1 if you have backtrace */
#cmakedefine HAVE_BACKTRACE 1
/* Define to 1 if you have getgrouplist */
#cmakedefine HAVE_GETGROUPLIST 1
/* Define to 1 if you have getpeerucred */
#cmakedefine HAVE_GETPEERUCRED 1
/* Define to 1 if you have nanosleep */
#cmakedefine HAVE_NANOSLEEP 1
/* Define to 1 if you have getpwnam_r */
#cmakedefine HAVE_POSIX_GETPWNAM_R 1
/* Define to 1 if you have socketpair */
#cmakedefine HAVE_SOCKETPAIR 1
/* Define to 1 if you have setenv */
#cmakedefine HAVE_SETENV 1
/* Define to 1 if you have unsetenv */
#cmakedefine HAVE_UNSETENV 1
/* Define to 1 if you have writev */
#cmakedefine HAVE_WRITEV 1
// structs
/* Define to 1 if you have struct cmsgred */
#cmakedefine HAVE_CMSGCRED 1
#if defined(_WIN32) || defined(_WIN64)
# define DBUS_WIN
# define DBUS_WIN_FIXME 1
// mingw mode_t
# ifdef HAVE_STDIO_H
# include <stdio.h>
# endif
# ifndef _MSC_VER
# define uid_t int
# define gid_t int
# else
# define snprintf _snprintf
# define strtoll _strtoi64
# define strtoull _strtoui64
typedef int mode_t;
# endif
# ifdef DBUS_VA_COPY
# undef DBUS_VA_COPY // DBUS_VA_COPY kills mingw's bus-test
# endif
#endif // defined(_WIN32) || defined(_WIN64)
#ifdef interface
#undef interface
#endif
#ifndef SIGHUP
#define SIGHUP 1
#endif
#cmakedefine DBUS_VERBOSE_C_S 1
#ifdef DBUS_VERBOSE_C_S
#define _dbus_verbose_C_S printf
#else
#define _dbus_verbose_C_S _dbus_verbose
#endif
#endif // _DBUS_CONFIG_H
:: environment setting for dbus clients
@echo off
:: session bus address
set DBUS_SESSION_BUS_ADDRESS=@DBUS_SESSION_BUS_DEFAULT_ADDRESS@
:: system bus address
set DBUS_SYSTEM_BUS_DEFAULT_ADDRESS=@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
\ No newline at end of file
:: environment setting for dbus clients
@echo off
:: session bus address
set DBUS_SESSION_BUS_ADDRESS=@DBUS_SESSION_BUS_DEFAULT_ADDRESS@
:: system bus address
set DBUS_SYSTEM_BUS_DEFAULT_ADDRESS=@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
if exist bus\session.conf (
@echo starting local dbus daemon
start "D-Bus daemon" "bin\dbus-daemon" "--config-file=bus\session.conf"
) else (
if not "%DBUSDIR%"=="" (
@echo starting dbus daemon identified by DBUSDIR=%DBUSDIR%
start "D-Bus daemon" "%DBUSDIR%\bin\dbus-daemon" "--session"
pause
) else (
if exist "%ProgramFiles%\dbus\bin\dbus-daemon.exe" (
@echo starting global dbus daemon located in %ProgramFiles%\dbus
start "D-Bus daemon" "%ProgramFiles%\dbus\bin\dbus-daemon" "--session"
) else (
@echo please set DBUSDIR to your DBUS installation dir and restart this script
)
)
)
project(dbus)
#INCLUDES=-I$(top_srcdir) $(DBUS_CLIENT_CFLAGS) -DDBUS_COMPILATION
include_directories(${CMAKE_SOURCE_DIR}/..)
SET(DBUS_DIR ${CMAKE_SOURCE_DIR}/../dbus)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/dbus-arch-deps.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/dbus-arch-deps.h )
add_definitions(-DDBUS_COMPILATION)
set (dbusinclude_HEADERS
${DBUS_DIR}/dbus.h
${DBUS_DIR}/dbus-address.h
${DBUS_DIR}/dbus-bus.h
${DBUS_DIR}/dbus-connection.h
${DBUS_DIR}/dbus-errors.h
${DBUS_DIR}/dbus-macros.h
${DBUS_DIR}/dbus-memory.h
${DBUS_DIR}/dbus-message.h
${DBUS_DIR}/dbus-misc.h
${DBUS_DIR}/dbus-pending-call.h
${DBUS_DIR}/dbus-protocol.h
${DBUS_DIR}/dbus-server.h
${DBUS_DIR}/dbus-shared.h
${DBUS_DIR}/dbus-signature.h
${DBUS_DIR}/dbus-threads.h
${DBUS_DIR}/dbus-types.h
dbus-arch-deps.h
)
### source code that goes in the installed client library
### and is specific to library functionality
set (DBUS_LIB_SOURCES
${DBUS_DIR}/dbus-address.c
${DBUS_DIR}/dbus-auth.c
${DBUS_DIR}/dbus-auth-script.c
${DBUS_DIR}/dbus-bus.c
${DBUS_DIR}/dbus-connection.c
${DBUS_DIR}/dbus-errors.c
${DBUS_DIR}/dbus-keyring.c
${DBUS_DIR}/dbus-marshal-header.c
${DBUS_DIR}/dbus-marshal-byteswap.c
${DBUS_DIR}/dbus-marshal-recursive.c
${DBUS_DIR}/dbus-marshal-validate.c
${DBUS_DIR}/dbus-message.c
${DBUS_DIR}/dbus-misc.c
${DBUS_DIR}/dbus-object-tree.c
${DBUS_DIR}/dbus-pending-call.c
${DBUS_DIR}/dbus-resources.c
${DBUS_DIR}/dbus-server.c
${DBUS_DIR}/dbus-server-socket.c
${DBUS_DIR}/dbus-server-debug-pipe.c
${DBUS_DIR}/dbus-sha.c
${DBUS_DIR}/dbus-signature.c
${DBUS_DIR}/dbus-timeout.c
${DBUS_DIR}/dbus-threads.c
${DBUS_DIR}/dbus-transport.c
${DBUS_DIR}/dbus-transport-socket.c
${DBUS_DIR}/dbus-watch.c
#dbus-md5.c
#
# find a clean Windows implementation
# and move code to a *-win.c file
${DBUS_DIR}/dbus-transport-unix.c
${DBUS_DIR}/dbus-server-unix.c
)
set (DBUS_LIB_HEADERS
${DBUS_DIR}/dbus-auth.h
${DBUS_DIR}/dbus-auth-script.h
${DBUS_DIR}/dbus-connection-internal.h
${DBUS_DIR}/dbus-keyring.h
${DBUS_DIR}/dbus-marshal-header.h
${DBUS_DIR}/dbus-marshal-byteswap.h
${DBUS_DIR}/dbus-marshal-recursive.h
${DBUS_DIR}/dbus-marshal-validate.h
${DBUS_DIR}/dbus-message-internal.h
${DBUS_DIR}/dbus-message-private.h
${DBUS_DIR}/dbus-misc.h
${DBUS_DIR}/dbus-object-tree.h
${DBUS_DIR}/dbus-protocol.h
${DBUS_DIR}/dbus-resources.h
${DBUS_DIR}/dbus-server-debug-pipe.h
${DBUS_DIR}/dbus-server-protected.h
${DBUS_DIR}/dbus-server-unix.h
${DBUS_DIR}/dbus-sha.h
${DBUS_DIR}/dbus-timeout.h
${DBUS_DIR}/dbus-threads.h
${DBUS_DIR}/dbus-threads-internal.h
${DBUS_DIR}/dbus-transport.h
${DBUS_DIR}/dbus-transport-protected.h
${DBUS_DIR}/dbus-transport-unix.h
${DBUS_DIR}/dbus-watch.h
${CMAKE_BINARY_DIR}/config.h
##dbus-md5.h
)
### source code that goes in the installed client library
### AND is generic utility functionality used by the
### daemon or test programs (all symbols in here should
### be underscore-prefixed)
set (DBUS_SHARED_SOURCES
${DBUS_DIR}/dbus-dataslot.c
${DBUS_DIR}/dbus-hash.c
${DBUS_DIR}/dbus-internals.c
${DBUS_DIR}/dbus-list.c
${DBUS_DIR}/dbus-marshal-basic.c
${DBUS_DIR}/dbus-memory.c
${DBUS_DIR}/dbus-mempool.c
${DBUS_DIR}/dbus-string.c
${DBUS_DIR}/dbus-sysdeps.c
${DBUS_DIR}/dbus-sysdeps-util.c
${DBUS_DIR}/dbus-userdb.c
)
set (DBUS_SHARED_HEADERS
${DBUS_DIR}/dbus-dataslot.h
${DBUS_DIR}/dbus-hash.h
${DBUS_DIR}/dbus-internals.h
${DBUS_DIR}/dbus-list.h
${DBUS_DIR}/dbus-marshal-basic.h
${DBUS_DIR}/dbus-mempool.h
${DBUS_DIR}/dbus-string.h
${DBUS_DIR}/dbus-string-private.h
${DBUS_DIR}/dbus-sysdeps.h
${DBUS_DIR}/dbus-userdb.h
)