summaryrefslogtreecommitdiff
path: root/cmake
AgeCommit message (Collapse)AuthorFilesLines
2013-09-03Tests: allow dbus-glib to be replaced with use of libdbus-internalSimon McVittie2-2/+4
We only use dbus-glib for its main loop; within dbus, DBusLoop is available as an alternative, although it isn't thread-safe and isn't public API. For tests that otherwise only use libdbus public API, it's desirable to be able to avoid DBusLoop, so we can run them against an installed libdbus as an integration test. However, if we don't have dbus-glib, we're going to have to use an in-tree main loop, which might as well be DBusLoop. The major disadvantage of using dbus-glib is that it isn't safe to link both dbus-1 and dbus-internal at the same time. This is awkward for a future test case that wants to use _dbus_getsid() in dbus-daemon.c, but only on Windows (fd.o #54445). If we use the same API wrapper around both dbus-glib and DBusLoop, we can compile that test against dbus-glib or against DBusLoop, depending on the platform. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-09-03Define DBUS_COMPILATION externally for all tests that use internal stuffSimon McVittie1-1/+1
It might as well go in the AM_CPPFLAGS rather than in the source code. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=68852 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-08-28Generate autotools provided PACKAGE_.. and VERSION defines by a cmake macro.Ralf Habacker3-1/+74
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67072 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-28Fixed mingw gcc 4.8.1 complains about double defined macros.Ralf Habacker1-8/+1
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=67072 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-08-23Revert "Factor out DBusAuthorization from DBusTransport"Simon McVittie1-2/+0
This reverts commit 600621dbc8073527a958091316eddfbb490c1032.
2013-08-23Factor out DBusAuthorization from DBusTransportCosimo Alfarano1-0/+2
In order to authorize/reject a connection in a polite way, instead of cutting it off after authentication succeed and Hello() is sent, because authorization failed, we need to factor out some authorization bits from DBusTransport and pass them to DBusAuth. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39720 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-07-01cmake: do not bind to any particular POSIX C standardChengwei Yang1-1/+1
This caused build failures on FreeBSD. Defining _POSIX_C_SOURCE to a particular version will disable common non-POSIX extensions like PF_UNIX, and on some systems will also disable features of later POSIX versions, like IPv6. If we don't ask for a specific version, we'll get some sort of sensible default. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> [made the commit message more concise -smcv] Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-28tests to embedded tests: replaced in cmake filesChengwei Yang5-10/+11
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66291
2013-06-28cmake: align dir watch backend detection with autotoolsChengwei Yang2-7/+33
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28cmake: terminate to generate makefiles due to fatal errorChengwei Yang1-2/+2
FATAL isn't a valid key for message according to cmake document here. http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command%3amessage Due to the real fatal error, FATAL_ERROR should be used to terminate cmake from continue generating makefiles. Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28cmake: get rid of useless commented out codeChengwei Yang1-48/+0
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-28dir-watch: remove dnotify backendChengwei Yang2-7/+0
dnotify as a dir watch backend is broken since Jan 2010 (almost 3.5 years). According to fd.o: #33001, it's no harm to remove dnotify from this project. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33001 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-28cmake: clean up libxml2 glueChengwei Yang1-5/+3
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66257
2013-06-25Explicitly define macros to get less confusing conditionsChengwei Yang1-0/+6
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=65990 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-25Convert a{sv} helpers from Stats into generic utility codeSimon McVittie1-0/+2
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54445 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-06-25cmake: remove a duplicate line and fix coding styleChengwei Yang1-3/+1
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66142 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-25cmake: fix a typo DBUS_DISABLE_ASSERTS should be DBUS_DISABLE_ASSERTChengwei Yang2-9/+9
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=66142 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-24Use Doxyfile.in for cmake build system too.Ralf Habacker2-182/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64875 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-18Fix of cmake xmldoc dependencies chain.Ralf Habacker1-7/+12
This patch fixes an issues that xml documentation is generated on all builds regardless if related files has been changed or not. The patch adds a global xmldoc make target to which all generated html or man files are added as build dependency. Each dependency itself depends on related CMakeLists.txt and the xml file generated from the related xml.in file. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64058 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-18Fixed wrong path for generated xml files when creating man pages with cmake.Ralf Habacker1-5/+5
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=64058 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-06-17Replace individual global-lock variables with an array of DBusRMutex *Simon McVittie1-1/+0
This means we can use a much simpler code structure in data-slot allocators: instead of giving them a DBusRMutex ** at first-allocation, we can just give them an index into the array, which can be done statically. It doesn't make us any more thread-safe-by-default - the mutexes will only actually be used if threads were already initialized - but it's substantially better than nothing. These locks really do have to be recursive: for instance, internal_bus_get() calls dbus_bus_register() under the bus lock, and dbus_bus_register() can call _dbus_connection_close_possibly_shared(), which takes the bus lock. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> Reviewed-by: Anas Nashif <anas.nashif@intel.com>
2013-06-06XML: hard depends on expat and delete libxmlChengwei Yang3-30/+6
[The libxml code path has been broken for at least 2.5 years, and Expat is tiny, so there seems no point in supporting both. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=20253 Signed-off-by: Chengwei Yang <chengwei.yang@intel.com> Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-05-10dbus_threads_init_default, dbus_threads_init: be safe to call at any timeSimon McVittie1-0/+1
On Unix, we use a pthreads mutex, which can be allocated and initialized in global memory. On Windows, we use a CRITICAL_SECTION, together with a call to InitializeCriticalSection() from the constructor of a global static C++ object (thanks to Ralf Habacker for suggesting this approach). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-04-29Fixed cmake windows build system bug not installing runtime part of shared ↵Ralf Habacker2-1/+7
libraries into bin dir. This patch also take care of different install directories on unix like os. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-04-18Rename default_message_unix_fds to DEFAULT_MESSAGE_UNIX_FDSSimon McVittie2-2/+2
As Ralf pointed out, we usually use upper-case when substituting variables (apart from "somethingdir", which Autoconf conventionally makes lower-case for some reason). Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63682 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-04-18cmake: define default_message_unix_fds so it can be substituted in session.confSimon McVittie2-1/+5
This fixes a regression since 1.7.0: session.conf would be invalid when generated by cmake. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=63682 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2013-04-11Set default maximum number of Unix fds according to OSMatt Fischer1-0/+2
QNX has an arbitrary limit to the number of file descriptors which may be passed in a message, which is smaller than the current default. This patch therefore changes the default from a hardcoded constant to a macro, which is determined at configure time by looking at the host operating system. [This reduces the limit from 4096 (session)/1024 (system) to 128 fds per message on QNX, and 1024 fds per message on other operating systems. I think the reduced session bus limit on other OSs is a reasonable change too, given that the default hard/soft ulimits in Linux are only 4096/1024 fds per process. -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61176 Reviewed-by: Simon McVittie <simon.mcvittie.collabora.co.uk>
2013-04-05Add function _dbus_get_peer_pid_from_tcp_handle() which returns pid and sid ↵Ralf Habacker1-2/+2
from tcp connection peer. This function is called by _dbus_read_credentials_socket() to fetch client credentials. Because Wine is used to check cross compiled dbus for windows, in calls to GetExtendedTcpTable() we use table class TCP_TABLE_OWNER_PID_ALL instead of TCP_TABLE_OWNER_PID_CONNECTIONS. This class is the only one which is available since wine 1.5.3. https://bugs.freedesktop.org/show_bug.cgi?id=61787 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-03-04CMake linux fixes when using meinproc4 doc generator.Ralf Habacker1-4/+7
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61637 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-03-04Fix cmake linux build: dbus-1 and dbus-internal require to link to rt libraryRalf Habacker1-2/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61637 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-18Removed precarious cross compile shell script.Ralf Habacker1-110/+0
CMake provides a standardized way to cross compile packages by using -DCMAKE_TOOLCHAIN_FILE at configure time. Also recent distributions like opensuse provides up to date native mingw binary packages and cross compile packages which reduces the cross compile setup to package installation and setup of a cross tool chain file as documented at http://www.vtk.org/Wiki/CMake_Cross_Compiling. https://bugs.freedesktop.org/show_bug.cgi?id=59733 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14Turn all man pages' source into configure-generated filesSimon McVittie1-5/+10
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805 Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de> [dropped whitespace changes per Ralf's review -smcv] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14Generate man pages from xml docbook sources for cmake buildsystem.Ralf Habacker1-9/+27
[removed commented line -smcv] Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14Updated man docbook xml sources from man page source using doclifter.Ralf Habacker1-0/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-14Moved docbook sources used by cmake into doc subdir and adapted cmake build ↵Ralf Habacker5-1264/+10
system. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59805 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-12Fixed cmake cross compile timestamp creating.Ralf Habacker1-6/+3
We only need to distinct "Windows" from unix like systems Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-02-12Uses cmake provided expat find package.Ralf Habacker2-68/+8
The cmake provided expat find package is more up to date. There is no need to maintain an additional one. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-01-29CMake build system fix: Lets check for xmlto doc book generator first.Ralf Habacker1-9/+7
We shouldn't try to build the documentation with meinproc *and* xmlto. Prefer xmlto, since it's also the one we use under Autotools. We still need to support meinproc as a fallback, because xmlto isn't available on Windows. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-01-15Fixed cmake warning related to WIN32 macro when configuring on cygwinRalf Habacker1-0/+3
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59401 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2013-01-15Create missing directories in cmake <build-root>/bus/session.d and ↵Ralf Habacker1-0/+3
<build-root>/bus/system.d Bug: https://bugs.freedesktop.org/show_bug.cgi?id=41319 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-08-13Split DBUS_SESSION_BUS_DEFAULT_ADDRESS into listen, connect addresses and ↵Simon McVittie3-6/+9
set better defaults On Unix, the connect address should basically always be "autolaunch:" but the listen address has to be something you can listen on. On Windows, you can listen on "autolaunch:" or "autolaunch:scope=*install-path", for instance, and the dbus-daemon is involved in the auto-launching process. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201 Reviewed-by: David Zeuthen <davidz@redhat.com> [default address changed to autolaunch: for interop with GDBus -smcv] Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2012-08-13cmake: use the same default system bus address as for autotoolsSimon McVittie1-2/+9
The system bus is unsupported (and rather meaningless) on Windows anyway, so we can use anything. Also, make it clear that it has to be a "specific" address that can be listened on *and* connected to, like unix:path=/xxx - a listen-only address like unix:tmpdir=/xxx or nonce-tcp: would not be suitable. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201 Reviewed-by: David Zeuthen <davidz@redhat.com>
2012-06-15On Unix, link libdbus to a platform-specific threading librarySimon McVittie2-0/+6
On Linux, this is libpthread; on other Unixes, in principle it might be called libpthreads or libthreads or something. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=47237 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Ralf Habacker <ralf.habacker@freenet.de>
2012-03-22doc: update documentation with own_prefix policy rulesAlban Crequy1-0/+8
https://bugs.freedesktop.org/show_bug.cgi?id=46886
2012-02-24Add dbus-syntax.[ch]Simon McVittie1-0/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39549 Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
2012-02-09Windows compile fixRalf Habacker1-0/+3
BUG: https://bugs.freedesktop.org/show_bug.cgi?id=45832
2012-01-04Revert "keep cmake in sync with automake related to default bus addresses"Simon McVittie1-2/+2
This reverts commit fdab4af0f4748f1fb5d23ca41e201cca4adb0b2f. Further discussion required. Related to https://bugs.freedesktop.org/show_bug.cgi?id=38201
2012-01-04Revert "made session service dirs customizable: cmake part"Simon McVittie2-5/+0
This reverts commit 89e453216c02bb85c5e53d459997f8bc3b2c73d4. It makes the tests fail under autotools.
2011-12-22keep cmake in sync with automake related to default bus addressesRalf Habacker1-2/+2
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38201
2011-12-21Merge branch 'dbus-1.4'Ralf Habacker2-13/+46