From ea58ec1cf9d07db62542f257e2401f21d0d937e0 Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Fri, 16 Mar 2007 22:34:40 +0000 Subject: [PATCH] * cmake/modules/FindExpat.cmake: fix package detection on win32. * README.win: update install instructions. --- ChangeLog | 6 ++++++ README.win | 16 +++++++++++----- cmake/modules/FindLibExpat.cmake | 14 ++++++++++++-- 3 files changed, 29 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 081e3a5..808c9eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-03-16 Ralf.Habacker + * cmake/modules/FindExpat.cmake: fix package detection on win32. + + * README.win: update install instructions. + +2007-03-16 Ralf.Habacker + * dbus/dbus-sysdeps.h (_dbus_split_paths_and_append): new prototyp (_DBUS_PATH_SEPARATOR): new macro. diff --git a/README.win b/README.win index b941a08..7646974 100644 --- a/README.win +++ b/README.win @@ -5,7 +5,7 @@ Windows port of the freedesktop.org D-Bus Requirements ------------ - cmake version >= 2.4.4 see http://www.cmake.org -- installed libxml2 or libexpat +- installed libxml2 or libexpat from http://82.149.170.66/kde-windows/win32libs Build ----- @@ -23,18 +23,24 @@ win32 1. Install your prefered compiler - Mingw from www.mingw.org - Visual C++ 2005 Express/Studio -2. Install win32libs packages from - http://www.abi-neuhaus.de/chris/win32libs/ - into a subdir win32libs in your program installation eg c:\Programme\win32libs (german) - or "c:\Program Files\win32libs" (english) + +2. Install libxml2 or libexpat packages from + http://82.149.170.66/kde-windows/win32libs + into a subdir win32libs in your program installation eg + - german => "c:\Programme\win32libs" + - english => "c:\Program Files\win32libs" + 3. download and install the most recent CMake version from http://www.cmake.org/files/ + 4. apply dbus-win.patch: 'patch -p0 -i dbus-win.patch' + 5. open command shell and run in the created build folder which resides side by side to the D-Bus sources: - for mingw: cmake -G "MinGW Makefiles" ..\\cmake - for Visual C++ cmake ..\\cmake + 7. build diff --git a/cmake/modules/FindLibExpat.cmake b/cmake/modules/FindLibExpat.cmake index 155083b..a07c8de 100644 --- a/cmake/modules/FindLibExpat.cmake +++ b/cmake/modules/FindLibExpat.cmake @@ -13,13 +13,23 @@ if (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES) else (LIBEXPAT_INCLUDE_DIR AND LIBEXPAT_LIBRARIES) - IF (NOT WIN32) + IF (WIN32) + file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles) + find_FILE(LIBEXPAT_DIR expat Source/lib/expat.h + PATHS + "${_progFiles}" + ) + if (LIBEXPAT_DIR) + set (_LIBEXPATIncDir ${LIBEXPAT_DIR}/Source/lib) + set (_LIBEXPATLinkDir ${LIBEXPAT_DIR}/libs) + endif (LIBEXPAT_DIR) + ELSE (WIN32) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls INCLUDE(UsePkgConfig) PKGCONFIG(LIBEXPAT-2.0 _LIBEXPATIncDir _LIBEXPATLinkDir _LIBEXPATLinkFlags _LiIconvCflags) SET(LIBEXPAT_DEFINITIONS ${_LIBEXPATCflags}) - ENDIF (NOT WIN32) + ENDIF (WIN32) FIND_PATH(LIBEXPAT_INCLUDE_DIR expat.h PATHS -- 2.7.4