Commit 443b8ec3 authored by Ralf Habacker's avatar Ralf Habacker

Merge branch 'dbus-1.4'

Conflicts:
	cmake/CMakeLists.txt
parents 8acd2e21 17678401
...@@ -13,11 +13,6 @@ set (DBUS_VERSION ${DBUS_MAJOR_VERSION}.${DBUS_MINOR_VERSION}.${DBUS_MICRO_VERSI ...@@ -13,11 +13,6 @@ set (DBUS_VERSION ${DBUS_MAJOR_VERSION}.${DBUS_MINOR_VERSION}.${DBUS_MICRO_VERSI
set (DBUS_VERSION_STRING "${DBUS_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 # we need to be up to date
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR) CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR)
if(COMMAND cmake_policy) if(COMMAND cmake_policy)
...@@ -27,6 +22,9 @@ endif(COMMAND cmake_policy) ...@@ -27,6 +22,9 @@ endif(COMMAND cmake_policy)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
include(Macros)
TIMESTAMP(DBUS_BUILD_TIMESTAMP)
########### basic vars ############### ########### basic vars ###############
...@@ -87,9 +85,8 @@ if (WIN32) ...@@ -87,9 +85,8 @@ if (WIN32)
include(Win32Macros) include(Win32Macros)
addExplorerWrapper(${CMAKE_PROJECT_NAME}) addExplorerWrapper(${CMAKE_PROJECT_NAME})
endif (WIN32) endif (WIN32)
find_package(LibXml2)
find_package(LibExpat) option (DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" ON)
find_package(X11)
if(NOT WIN32) if(NOT WIN32)
option (DBUS_ENABLE_ABSTRACT_SOCKETS "enable support for abstract sockets" ON) option (DBUS_ENABLE_ABSTRACT_SOCKETS "enable support for abstract sockets" ON)
...@@ -102,6 +99,13 @@ option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF) ...@@ -102,6 +99,13 @@ option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF) option (DBUS_ENABLE_STATS "enable bus daemon usage statistics" OFF)
if (DBUS_USE_EXPAT)
find_package(LibExpat)
else ()
find_package(LibXml2)
endif ()
find_package(X11)
# analogous to AC_USE_SYSTEM_EXTENSIONS in configure.ac # analogous to AC_USE_SYSTEM_EXTENSIONS in configure.ac
add_definitions(-D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE) add_definitions(-D_POSIX_C_SOURCE=199309L -D_GNU_SOURCE)
...@@ -116,7 +120,6 @@ include (MacroLibrary) ...@@ -116,7 +120,6 @@ include (MacroLibrary)
if(VCS) if(VCS)
set(DBUS_VERBOSE_C_S 1 CACHE STRING "verbose mode" FORCE) set(DBUS_VERBOSE_C_S 1 CACHE STRING "verbose mode" FORCE)
set(DBUS_VERBOSE_C_S 1)
endif(VCS) endif(VCS)
if(WIN32) if(WIN32)
...@@ -301,12 +304,6 @@ if(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND) ...@@ -301,12 +304,6 @@ if(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
message(FATAL "Neither expat nor libxml2 found!") message(FATAL "Neither expat nor libxml2 found!")
endif(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND) endif(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
if(LIBEXPAT_FOUND)
option (DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" ON)
else(LIBEXPAT_FOUND)
option (DBUS_USE_EXPAT "Use expat (== ON) or libxml2 (==OFF)" OFF)
endif(LIBEXPAT_FOUND)
if(DBUS_USE_EXPAT) if(DBUS_USE_EXPAT)
SET(XML_LIB "Expat") SET(XML_LIB "Expat")
SET(XML_LIBRARY ${LIBEXPAT_LIBRARIES}) SET(XML_LIBRARY ${LIBEXPAT_LIBRARIES})
......
MACRO(TIMESTAMP RESULT)
IF(WIN32)
EXECUTE_PROCESS(COMMAND "cmd" " /C date /T" OUTPUT_VARIABLE DATE)
string(REGEX REPLACE "(..)[/.](..)[/.](....).*" "\\3\\2\\1" DATE ${DATE})
EXECUTE_PROCESS(COMMAND "cmd" " /C time /T" OUTPUT_VARIABLE TIME)
string(REGEX REPLACE "(..):(..)" "\\1\\2" TIME ${TIME})
set (${RESULT} "${DATE}${TIME}")
ELSEIF(UNIX)
EXECUTE_PROCESS(COMMAND "date" "+%Y%m%d%H%M" OUTPUT_VARIABLE ${RESULT})
ELSE()
MESSAGE(SEND_ERROR "date not implemented")
SET(${RESULT} 000000000000)
ENDIF()
ENDMACRO()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment