void-packages/srcpkgs/adriconf/patches/libxml++-3.0.patch

34 lines
1.1 KiB
Diff

Source: https://github.com/jlHertel/adriconf/commit/1ebe19290826b6cb0ba818e65211038900727081.patch
Upstream: Yes
Reason: libxml++-3.0 compatibility
From 1ebe19290826b6cb0ba818e65211038900727081 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= <ballogyor@gmail.com>
Date: Mon, 24 Dec 2018 22:13:59 +0100
Subject: [PATCH] Allow to build with LibXML++ 3.0
Keep it compatible with LibXML++ 2.6.
---
CMakeLists.txt | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 901ff9f..915eb4e 100644
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -39,7 +39,13 @@ include_directories(${Boost_INCLUDE_DIRS})
link_directories(${Boost_LIBRARY_DIRS})
# LIBXML
-pkg_check_modules(LibXML++ REQUIRED libxml++-2.6)
+pkg_check_modules(LibXML++ libxml++-3.0)
+if(NOT LibXML++_FOUND)
+ pkg_check_modules(LibXML++2 REQUIRED libxml++-2.6)
+ set(LibXML++_INCLUDE_DIRS ${LibXML++2_INCLUDE_DIRS})
+ set(LibXML++_LIBRARY_DIRS ${LibXML++2_LIBRARY_DIRS})
+ set(LibXML++_LIBRARIES ${LibXML++2_LIBRARIES})
+endif()
include_directories(${LibXML++_INCLUDE_DIRS})
link_directories(${LibXML++_LIBRARY_DIRS})