"Fossies" - the Fresh Open Source Software Archive

Member "dbus-1.13.18/README.cmake" (1 Jul 2020, 7957 Bytes) of package /linux/misc/dbus-1.13.18.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) CMake source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "README.cmake": 1.13.16_vs_1.13.18.

    1 This file describes how to compile dbus using the cmake build system
    2 
    3 Requirements
    4 ------------
    5 - cmake version >= 2.6.0 see http://www.cmake.org
    6 - installed libexpat see http://sourceforge.net/projects/expat/ 
    7     unsupported RelWithDebInfo builds could be fetched 
    8     from http://sourceforge.net/projects/kde-windows/files/expat/
    9 - for generating documentation based on docbook files
   10     - xsltproc (provided by the distribution or from http://xmlsoft.org/XSLT/xsltproc2.html) and
   11     - docbook dtd and stylesheets (provided by the distribution or from https://sourceforge.net/projects/docbook/)
   12 
   13 Building
   14 --------
   15 
   16 Win32 MinGW-w64|32
   17 1. install mingw-w64 from http://sourceforge.net/projects/mingw-w64/
   18 2. install cmake, libexpat and optional xsltproc and docbook dtd and stylesheets
   19 3. get dbus sources
   20 4. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
   21 5. mkdir dbus-build
   22 6. cd dbus-build
   23 7. run 
   24     cmake -G "MinGW Makefiles" [<options, see below>] <dbus-src-root>
   25     mingw32-make
   26     mingw32-make install
   27 
   28 Mingw32 cross compile on Linux
   29 2. install cmake, libexpat and optional xsltproc and docbook dtd and stylesheets
   30     e.g on openSUSE Leap 15.0:
   31       sudo zypper ar -f https://download.opensuse.org/repositories/windows:/mingw:/win32/openSUSE_Leap_15.0/
   32       sudo zypper install mingw32-cross-gcc-c++ mingw32-libexpat-devel libxslt-tools mingw32-docbook_4 mingw32-docbool-xsl-stylesheets
   33 2. get dbus sources
   34 3. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
   35 4. mkdir dbus-build
   36 5. cd dbus-build
   37 6. run
   38     cmake -DCMAKE_TOOLCHAIN_FILE=<dbus-src-root>/cmake/i686-w64-mingw32.cmake \
   39           -DCMAKE_FIND_ROOT_PATH=/usr/i686-w64-mingw32/sysroot/i686-w64-mingw32 \
   40           [<options, see below>] <dbus-src-root>
   41     make
   42     make install
   43 
   44     Win32 Microsoft nmake
   45 1. install MSVC 2010 Express Version from http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
   46 2. install cmake, libexpat and optional xsltproc and docbook dtd and stylesheets
   47 3. get dbus sources
   48 4. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
   49 5. mkdir dbus-build
   50 6. cd dbus-build
   51 7. run 
   52     cmake -G "NMake Makefiles" [<options, see below>] <dbus-src-root>
   53     nmake
   54     nmake install
   55 
   56 Win32 Visual Studio 2010 Express IDE
   57 1. install MSVC 2010 Express Version from http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express
   58 2. install cmake, libexpat and optional xsltproc and docbook dtd and stylesheets
   59 3. get dbus sources
   60 4. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
   61 5. mkdir dbus-build
   62 6. cd dbus-build
   63 7. run
   64       cmake -G "Visual Studio 10" [<options, see below>] <dbus-src-root>
   65 8a. open IDE with
   66       vcexpress dbus.sln
   67 8b. for immediate build run
   68       vcexpress dbus.sln /build
   69 
   70 Win32 Visual Studio 2010 Professional IDE
   71 1. install MSVC 2010 Professional Version
   72 2. install cmake, libexpat and optional xsltproc and docbook dtd and stylesheets
   73 3. get dbus sources
   74 4. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
   75 5. mkdir dbus-build
   76 6. cd dbus-build
   77 7. run 
   78       cmake -G "Visual Studio 10" [<options, see below>] <dbus-src-root>
   79 8a. open IDE with
   80       devenv dbus.sln
   81 8b. for immediate build run
   82       devenv dbus.sln /build
   83 
   84 Linux
   85 2. install cmake, libexpat and optional xsltproc and docbook dtd and stylesheets
   86 2. get dbus sources
   87 3. unpack dbus sources into a sub directory (referred as <dbus-src-root> later)
   88 4. mkdir dbus-build
   89 5. cd dbus-build
   90 6. run 
   91     cmake [<options, see below>] <dbus-src-root>
   92     make
   93     make install
   94 
   95 For other compilers see cmake --help in the Generators section
   96 
   97 Configuration flags
   98 -------------------
   99 
  100 When using the cmake build system the dbus-specific configuration flags that can be given 
  101 to the cmake program are these (use -D<key>=<value> on command line). The listed values 
  102 are the defaults (in a typical build - some are platform-specific).
  103 
  104 // in case cmake is not able to determine the xsltproc executable (optional)
  105 XSLTPROC_EXECUTABLE=<path to xsltproc executable)
  106 
  107 // in case cmake is not able to determine the installation of the docbook stylesheets (optional)
  108 DOCBOOKXSL_DIR=<path to docbook stylesheets)
  109 
  110 // Choose the type of build, options are: None(CMAKE_CXX_FLAGS or
  111 // CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.
  112 CMAKE_BUILD_TYPE:STRING=Debug
  113 
  114 // Include path for 3rdparty packages
  115 CMAKE_INCLUDE_PATH:PATH=
  116 
  117 // Library path for 3rdparty packages
  118 CMAKE_LIBRARY_PATH:PATH=
  119 
  120 // Install path prefix, prepended onto install directories.
  121 CMAKE_INSTALL_PREFIX:PATH=C:/Program Files/dbus
  122 
  123 
  124 // enable unit test code
  125 DBUS_BUILD_TESTS:BOOL=ON
  126 
  127 // The name of the dbus daemon executable
  128 DBUS_DAEMON_NAME:STRING=dbus-daemon
  129 
  130 // Disable assertion checking
  131 DBUS_DISABLE_ASSERT:BOOL=OFF
  132 
  133 // Disable public API sanity checking
  134 DBUS_DISABLE_CHECKS:BOOL=OFF
  135 
  136 // enable -ansi -pedantic gcc flags
  137 DBUS_ENABLE_ANSI:BOOL=OFF
  138 
  139 // build DOXYGEN documentation (requires Doxygen)
  140 DBUS_ENABLE_DOXYGEN_DOCS:BOOL=OFF
  141 
  142 // build qt help documentation (requires qhelpgenerator(-qt5));
  143 // set INSTALL_QCH_DIR for custom qch installation path
  144 ENABLE_QT_HELP:STRING=AUTO
  145 
  146 // enable bus daemon usage statistics
  147 DBUS_ENABLE_STATS:BOOL=OFF
  148 
  149 // enable restricted servers for app containers
  150 DBUS_ENABLE_CONTAINERS:BOOL=OFF
  151 
  152 // build with systemd at_console support
  153 ENABLE_SYSTEMD:STRING=AUTO
  154 
  155 // Directory for systemd service files
  156 WITH_SYSTEMD_SYSTEMUNITDIR:STRING=
  157 
  158 // enable user-session semantics for session bus under systemd
  159 ENABLE_USER_SESSION:BOOL=ON
  160 
  161 // Directory for systemd user service files
  162 WITH_SYSTEMD_USERUNITDIR:STRING=
  163 
  164 // support verbose debug mode
  165 DBUS_ENABLE_VERBOSE_MODE:BOOL=ON
  166 
  167 // build XML  documentation (requires xmlto or meinproc4)
  168 DBUS_ENABLE_XML_DOCS:BOOL=ON
  169 
  170 // install required system libraries
  171 DBUS_INSTALL_SYSTEM_LIBS:BOOL=OFF
  172 
  173 // session bus default listening address
  174 DBUS_SESSION_BUS_LISTEN_ADDRESS:STRING=autolaunch:
  175 
  176 // session bus fallback address for clients
  177 DBUS_SESSION_BUS_CONNECT_ADDRESS:STRING=autolaunch:
  178 
  179 // system bus default address (only useful on Unix)
  180 DBUS_SYSTEM_BUS_DEFAULT_ADDRESS:STRING=unix:path=/var/run/dbus/system_bus_socket
  181 
  182 win32 only:
  183 // enable win32 debug port for message output
  184 DBUS_USE_OUTPUT_DEBUG_STRING:BOOL=OFF
  185 
  186 // use wine to run cross compiled test applications (only for cross compiling for Windows)
  187 DBUS_USE_WINE:BOOL=OFF
  188 
  189 gcc only:
  190 // compile with coverage profiling instrumentation
  191 DBUS_GCOV_ENABLED:BOOL=OFF
  192 
  193 solaris only:
  194 // enable console owner file 
  195 HAVE_CONSOLE_OWNER_FILE:BOOL=ON
  196 
  197 // Directory to check for console ownership
  198 DBUS_CONSOLE_OWNER_FILE:STRING=/dev/console
  199 
  200 // Linux only:
  201 // enable inotify as dir watch backend
  202 DBUS_BUS_ENABLE_INOTIFY:BOOL=ON
  203 
  204 *BSD only:
  205 // enable kqueue as dir watch backend
  206 DBUS_BUS_ENABLE_KQUEUE:BOOL=ON
  207 
  208 x11 only:
  209 // Build with X11 auto launch support
  210 DBUS_BUILD_X11:BOOL=ON
  211 
  212 MSVC only (Visual Studio >= 2012):
  213 // Enable code analyzing for MSVC compiler: /analyze
  214 DBUS_MSVC_ANALYZE:BOOL=OFF
  215 
  216 Note: Above mentioned options starting with DBUS_ or CMAKE_ could
  217 be extracted after configuring from the output of running
  218 "<maketool> help-options" in the build directory.
  219 
  220 
  221 How to compile in dbus into clients with cmake
  222 ----------------------------------------------
  223 
  224 To compile dbus library into a client application with cmake
  225 the following cmake commands are required:
  226 
  227 1. call find_package to find dbus package
  228 
  229 find_package(DBus1)
  230 
  231 2. after specifing targets link dbus into target
  232 
  233 add_executable(test test.c)
  234 target_link_libraries(test ${DBus1_LIBRARIES})
  235 
  236 Adding ${DBus1_LIBRARIES} to targets also adds required dbus
  237 include dirs and compiler definitions by default. There is
  238 no need to add them with include_directories and add_definitions.
  239 
  240 To compile against dbus installed in a non standard location
  241 specify -DDBus1_DIR=<dbus-install-root>/lib[64]/cmake/DBus1
  242 on cmake command line.