From 1ac5203e386e80f80906a341bf7ae9eaa124d774 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Sun, 12 Apr 2015 11:57:04 +0200 Subject: Switch to CMake ... --- cmake/Modules/FindLibXML++.cmake | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 cmake/Modules/FindLibXML++.cmake (limited to 'cmake/Modules/FindLibXML++.cmake') diff --git a/cmake/Modules/FindLibXML++.cmake b/cmake/Modules/FindLibXML++.cmake new file mode 100644 index 0000000..3bbb021 --- /dev/null +++ b/cmake/Modules/FindLibXML++.cmake @@ -0,0 +1,37 @@ +# find libxml++ +# +# exports: +# +# LibXML++_FOUND +# LibXML++_INCLUDE_DIRS +# LibXML++_LIBRARIES +# +include(FindPkgConfig) +include(FindPackageHandleStandardArgs) +# Use pkg-config to get hints about paths +pkg_check_modules(LibXML++_PKGCONF REQUIRED libxml++-2.6) +# Include dir +find_path(LibXML++_INCLUDE_DIR +NAMES libxml++/libxml++.h +PATHS ${LibXML++_PKGCONF_INCLUDE_DIRS} +) + +# Finally the library itself +find_library(LibXML++_LIBRARY +NAMES xml++ xml++-2.6 +PATHS ${LibXML++_PKGCONF_LIBRARY_DIRS} +) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXML++ DEFAULT_MSG LibXML++_LIBRARY LibXML++_INCLUDE_DIR) +if(LibXML++_PKGCONF_FOUND) +set(LibXML++_LIBRARIES ${LibXML++_LIBRARY} ${LibXML++_PKGCONF_LIBRARIES}) +set(LibXML++_INCLUDE_DIRS ${LibXML++_INCLUDE_DIR} ${LibXML++_PKGCONF_INCLUDE_DIRS}) +set(LibXML++_FOUND yes) +else() +set(LibXML++_LIBRARIES) +set(LibXML++_INCLUDE_DIRS) +set(LibXML++_FOUND no) +endif() +# Set the include dir variables and the libraries and let libfind_process do the rest. +# NOTE: Singular variables for this library, plural for libraries this this lib depends on. +#set(LibXML++_PROCESS_INCLUDES LibXML++_INCLUDE_DIR) +#set(LibXML++_PROCESS_LIBS LibXML++_LIBRARY) -- cgit v1.2.3