summaryrefslogtreecommitdiff
path: root/cmake/CMakeLists.txt
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2013-01-29 19:52:06 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-02-12 10:58:04 +0000
commit48fb808351957096330b742b6da096e3fe9493ae (patch)
treef9a883cf7e015a6da583e8f921f01ef3f0399ccf /cmake/CMakeLists.txt
parent161b7d7007dc17f7540bf5735487cc2e53865168 (diff)
downloaddbus-48fb808351957096330b742b6da096e3fe9493ae.tar.gz
Uses cmake provided expat find package.
The cmake provided expat find package is more up to date. There is no need to maintain an additional one. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=59733 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to 'cmake/CMakeLists.txt')
-rw-r--r--cmake/CMakeLists.txt15
1 files changed, 8 insertions, 7 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 51aa4f4a..9a37e40f 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -1,3 +1,6 @@
+# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
+list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
+
# we do not need to have WIN32 defined
set(CMAKE_LEGACY_CYGWIN_WIN32 0)
@@ -9,8 +12,6 @@ if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
-# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
# detect version
include(MacrosAutotools)
@@ -98,7 +99,7 @@ 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)
+ find_package(EXPAT)
else ()
find_package(LibXml2)
endif ()
@@ -298,14 +299,14 @@ if("${sysname}" MATCHES ".*SOLARIS.*")
endif("${sysname}" MATCHES ".*SOLARIS.*")
#AC_ARG_WITH(xml, AS_HELP_STRING([--with-xml=[libxml/expat]],[XML library to use]))
-if(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
+if(NOT LIBXML2_FOUND AND NOT EXPAT_FOUND)
message(FATAL "Neither expat nor libxml2 found!")
-endif(NOT LIBXML2_FOUND AND NOT LIBEXPAT_FOUND)
+endif(NOT LIBXML2_FOUND AND NOT EXPAT_FOUND)
if(DBUS_USE_EXPAT)
SET(XML_LIB "Expat")
- SET(XML_LIBRARY ${LIBEXPAT_LIBRARIES})
- SET(XML_INCLUDE_DIR ${LIBEXPAT_INCLUDE_DIR})
+ SET(XML_LIBRARY ${EXPAT_LIBRARIES})
+ SET(XML_INCLUDE_DIR ${EXPAT_INCLUDE_DIR})
else(DBUS_USE_EXPAT)
SET(XML_LIB "LibXML2")
SET(XML_LIBRARY ${LIBXML2_LIBRARIES})