diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-16 22:34:40 +0000 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2007-03-16 22:34:40 +0000 |
commit | ea58ec1cf9d07db62542f257e2401f21d0d937e0 (patch) | |
tree | b30fa52a04ffb9cb5b9465d20bda5782f3e1df04 /cmake/modules | |
parent | 6e07b30faba52c772f011a0dee999662ec46e1cb (diff) |
* cmake/modules/FindExpat.cmake: fix package detection on win32.
* README.win: update install instructions.
Diffstat (limited to 'cmake/modules')
-rw-r--r-- | cmake/modules/FindLibExpat.cmake | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/cmake/modules/FindLibExpat.cmake b/cmake/modules/FindLibExpat.cmake index 155083b5..a07c8de4 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 |