summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Wagner <david.wagner@intel.com>2014-02-19 17:28:56 +0100
committerDavid Wagner <david.wagner@intel.com>2014-02-19 17:28:56 +0100
commitd18e82ac2b08e12ae135be38752054856eb90735 (patch)
tree63793dc81a52dede62111ca28981a91608c5cce7
parent3635048a9854d5fa5e5bd254c3de74eecdc53a01 (diff)
downloadexternal_parameter-framework-d18e82ac2b08e12ae135be38752054856eb90735.zip
external_parameter-framework-d18e82ac2b08e12ae135be38752054856eb90735.tar.gz
external_parameter-framework-d18e82ac2b08e12ae135be38752054856eb90735.tar.bz2
xmlserializer/CMake: fail verbosely if libxml2 is not found
Also, append the libxml2 cflags if any. Signed-off-by: David Wagner <david.wagner@intel.com>
-rw-r--r--xmlserializer/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmlserializer/CMakeLists.txt b/xmlserializer/CMakeLists.txt
index 409719a..420055f 100644
--- a/xmlserializer/CMakeLists.txt
+++ b/xmlserializer/CMakeLists.txt
@@ -11,9 +11,17 @@ add_library(xmlserializer SHARED
XmlStringDocSource.cpp)
include(FindLibXml2)
+if(NOT LIBXML2_FOUND)
+ message(SEND_ERROR "
+ libxml2 NOT found. The parameter-framework wont compile.
+ Please install the development package (e.g. libxml2-dev on debian-based
+ Linux distributions).")
+endif(NOT LIBXML2_FOUND)
# TODO: check for the "XInclude" feature in libxml2 (how to ?)
+
include_directories(${LIBXML2_INCLUDE_DIR})
target_link_libraries(xmlserializer ${LIBXML2_LIBRARIES})
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBXML2_DEFINITIONS}")
install(TARGETS xmlserializer LIBRARY DESTINATION lib)
install(FILES