-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 "3")
-set (VERSION_RELEASE "1")
-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}")
# 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)
# 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)
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} ")
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)
#cmakedefine DBUS_DAEMONDIR "@DBUS_DAEMONDIR@"
#cmakedefine PACKAGE "@PACKAGE@"
/* Version number of package */
-#cmakedefine VERSION "@VERSION@"
-#cmakedefine DBUS_MAJOR_VERSION ${VERSION_MAJOR}
-#cmakedefine DBUS_MINOR_VERSION ${VERSION_MINOR}
-#cmakedefine DBUS_MICRO_VERSION ${VERSION_RELEASE}
-#cmakedefine DBUS_VERSION ((@VERSION_MAJOR@ << 16) | (@VERSION_MINOR@ << 8) | (@VERSION_RELEASE@))
-#cmakedefine DBUS_VERSION_STRING "@VERSION@"
+#cmakedefine DBUS_MAJOR_VERSION @DBUS_MAJOR_VERSION@
+#cmakedefine DBUS_MINOR_VERSION @DBUS_MINOR_VERSION@
+#cmakedefine DBUS_MICRO_VERSION @DBUS_MICRO_VERSION@
+#cmakedefine DBUS_VERSION ((@DBUS_MAJOR_VERSION@ << 16) | (@DBUS_MINOR_VERSION@ << 8) | (@DBUS_MICRO_VERSION@))
+#cmakedefine DBUS_VERSION_STRING "@DBUS_VERSION_STRING@"
// test binaries
/* Full path to test file test/test-exit in builddir */
# for debugging
${DBUS_UTIL_HEADERS}
)
+if (MSVC)
+ set (BUILD_FILEVERSION ${DBUS_MAJOR_VERSION},${DBUS_MINOR_VERSION},${DBUS_MICRO_VERSION},${DBUS_PATCH_VERSION})
+
+ # no idea how to create the current date as string
+ message(STATUS "FIXME create the current date as string in dbus/CMakeLists.txt")
+ set (BUILD_TIMESTAMP 20091205)
+
+ configure_file(${DBUS_DIR}/versioninfo.rc.in ${CMAKE_CURRENT_BINARY_DIR}/versioninfo.rc)
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/afxres.h "")
+ list(APPEND libdbus_SOURCES versioninfo.rc)
+ set_source_files_properties(versioninfo.rc COMPILE_FLAGS "-D__LINE__=1")
+endif (MSVC)
if(MSVC AND splitlib)
set(DBUS_LIB_TYPE STATIC)
{
DBusString plaintext;
DBusString encoded;
- _dbus_string_init_const (&plaintext, "D-Bus " VERSION);
+ _dbus_string_init_const (&plaintext, "D-Bus " DBUS_VERSION_STRING);
_dbus_string_init (&encoded);
_dbus_string_hex_encode (&plaintext, 0,
&encoded,
return FALSE;
if (!_dbus_string_append (&plaintext,
- "libdbus " VERSION))
+ "libdbus " DBUS_VERSION_STRING))
goto failed;
if (!_dbus_string_hex_encode (&plaintext, 0,