-set (PACKAGE dbus)
-
-# the version major, minor and release number should be synchron to the dbus cvs - windows releases should only update the patch level
-set (VERSION_MAJOR "1")
-set (VERSION_MINOR "2")
-set (VERSION_RELEASE "14")
-set (VERSION_PATCH "0")
-if (VERSION_PATCH)
- set (VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}-${VERSION_PATCH}" )
-else (VERSION_PATCH)
- set (VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_RELEASE}" )
-endif (VERSION_PATCH)
-set (DBUS_MAJOR_VERSION ${VERSION_MAJOR})
-set (DBUS_MINOR_VERSION ${VERSION_MAJOR})
-set (DBUS_MICRO_VERSION ${VERSION_MAJOR})
-set (DBUS_MAJOR_VERSION ${VERSION_MAJOR})
-set (DBUS_VERSION ${VERSION})
-set (DBUS_VERSION_STRING "${VERSION}")
-
-project(${PACKAGE})
+project(dbus)
+
+set (DBUS_MAJOR_VERSION "1")
+set (DBUS_MINOR_VERSION "3")
+set (DBUS_MICRO_VERSION "1")
+# used by file version info
+set (DBUS_PATCH_VERSION "1")
+set (DBUS_VERSION ${DBUS_MAJOR_VERSION}.${DBUS_MINOR_VERSION}.${DBUS_MICRO_VERSION})
+endif (DBUS_PATCH_VERSION)
+
+set (DBUS_VERSION_STRING "${DBUS_VERSION}")
+
+if (NOT DBUS_BUILD_TIMESTAMP)
+ message(STATUS "FIXME set DBUS_BUILD_TIMESTAMP to current date or fix current time stamp generation for having actual build date in version file info")
+ set (DBUS_BUILD_TIMESTAMP 20091231)
+endif (NOT DBUS_BUILD_TIMESTAMP)
# we need to be up to date
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR)
find_package(KDEWIN_Packager)
find_package(LibIconv)
include(Win32Macros)
- addExplorerWrapper(${PACKAGE})
+ addExplorerWrapper(${CMAKE_PROJECT_NAME})
endif (WIN32)
find_package(LibXml2)
find_package(LibExpat)
OPTION(DBUS_ENABLE_ABSTRACT_SOCKETS "enable support for abstract sockets" ON)
+if (MINGW)
+ set (DBUS_VA_COPY_AS_ARRAY 1)
+endif (MINGW)
+if (MSVC)
+ set (DBUS_HAVE_VA_COPY 1)
+ set (DBUS_VA_COPY_AS_ARRAY 0)
+endif (MSVC)
+
# do config checks
INCLUDE(ConfigureChecks.cmake)
set (CMAKE_DEBUG_POSTFIX "d")
endif(WIN32)
+SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG")
+
#########################################################################
# Windows CE
#
# change configuration in Visual Studio to 'Pocket PC 2003 (ARMV4)'
#
if(wince)
- project(${PACKAGE}-wince)
+ project(${CMAKE_PROJECT_NAME}-wince)
# don't forget parameters
set(wince 1 CACHE TYPE STRING FORCE)
set(wcelibcex ${wcelibcex} CACHE TYPE STRING FORCE)
#AC_ARG_ENABLE(tests, AS_HELP_STRING([--enable-tests],[enable unit test code]),enable_tests=$enableval,enable_tests=$USE_MAINTAINER_MODE)
OPTION(DBUS_BUILD_TESTS "enable unit test code" ON)
-add_definitions(-DDBUS_BUILD_TESTS)
+
+if(DBUS_BUILD_TESTS)
+ add_definitions(-DDBUS_BUILD_TESTS)
+endif(DBUS_BUILD_TESTS)
+
+OPTION(DBUS_USE_OUTPUT_DEBUG_STRING "enable win32 debug port for message output" OFF)
+if(DBUS_USE_OUTPUT_DEBUG_STRING)
+ add_definitions(-DDBUS_USE_OUTPUT_DEBUG_STRING)
+endif(DBUS_USE_OUTPUT_DEBUG_STRING)
# win32 dbus service support - this support is not complete
OPTION(DBUS_SERVICE "enable dbus service installer" OFF)
if (WIN32)
- set (DBUS_SESSION_BUS_DEFAULT_ADDRESS "tcp:host=localhost,port=0")
- set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "tcp:host=localhost,port=0")
+ OPTION(DBUS_USE_NONCE_TCP_DEFAULT_ADDRESS "Use nonce tcp default address" OFF)
+ if (DBUS_USE_NONCE_TCP_DEFAULT_ADDRESS)
+ set (DBUS_SESSION_BUS_DEFAULT_ADDRESS "nonce-tcp:host=localhost,port=0")
+ set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "nonce-tcp:host=localhost,port=0")
+ else (DBUS_USE_NONCE_TCP_DEFAULT_ADDRESS)
+ set (DBUS_SESSION_BUS_DEFAULT_ADDRESS "tcp:host=localhost,port=12434")
+ set (DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "tcp:host=localhost,port=12434")
+ endif (DBUS_USE_NONCE_TCP_DEFAULT_ADDRESS)
set (DBUS_SYSTEM_CONFIG_FILE "etc/system.conf")
set (DBUS_SESSION_CONFIG_FILE "etc/session.conf")
# bus-test expects a non empty string
GET_FILENAME_COMPONENT(C_COMPILER ${CMAKE_C_COMPILER} NAME)
GET_FILENAME_COMPONENT(CXX_COMPILER ${CMAKE_CXX_COMPILER} NAME)
-message(" D-BUS ${VERSION} ")
-message(" ========== ")
+message(" D-BUS ${DBUS_VERSION} ")
+message(" =========== ")
message(" ")
message(" prefix: ${prefix} ")
message(" exec_prefix: ${exec_prefix} ")
message(" System bus user: ${DBUS_USER} ")
message(" 'make check' socket dir: ${TEST_SOCKET_DIR} ")
endif (WIN32)
+if (MSVC)
+message(" build timestamp: ${DBUS_BUILD_TIMESTAMP} ")
+endif (MSVC)
+
MESSAGE(" ")
if (DBUS_BUILD_TESTS)
message("NOTE: building with unit tests increases the size of the installed library and renders it insecure.")
INCLUDE(modules/CPackInstallConfig.cmake)
if (KDEWIN_PACKAGER_FOUND)
- KDEWIN_PACKAGER(${PACKAGE} ${VERSION} "ipc library" "")
+ KDEWIN_PACKAGER(${CMAKE_PROJECT_NAME} ${DBUS_VERSION} "ipc library" "")
endif (KDEWIN_PACKAGER_FOUND)