summaryrefslogtreecommitdiff
path: root/Modules/FindXalanC.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindXalanC.cmake')
-rw-r--r--Modules/FindXalanC.cmake81
1 files changed, 41 insertions, 40 deletions
diff --git a/Modules/FindXalanC.cmake b/Modules/FindXalanC.cmake
index 1951b49e1..3adaa44d3 100644
--- a/Modules/FindXalanC.cmake
+++ b/Modules/FindXalanC.cmake
@@ -1,45 +1,46 @@
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
-#.rst:
-# FindXalanC
-# -----------
-#
-# Find the Apache Xalan-C++ XSL transform processor headers and libraries.
-#
-# Imported targets
-# ^^^^^^^^^^^^^^^^
-#
-# This module defines the following :prop_tgt:`IMPORTED` targets:
-#
-# ``XalanC::XalanC``
-# The Xalan-C++ ``xalan-c`` library, if found.
-#
-# Result variables
-# ^^^^^^^^^^^^^^^^
-#
-# This module will set the following variables in your project:
-#
-# ``XalanC_FOUND``
-# true if the Xalan headers and libraries were found
-# ``XalanC_VERSION``
-# Xalan release version
-# ``XalanC_INCLUDE_DIRS``
-# the directory containing the Xalan headers; note
-# ``XercesC_INCLUDE_DIRS`` is also required
-# ``XalanC_LIBRARIES``
-# Xalan libraries to be linked; note ``XercesC_LIBRARIES`` is also
-# required
-#
-# Cache variables
-# ^^^^^^^^^^^^^^^
-#
-# The following cache variables may also be set:
-#
-# ``XalanC_INCLUDE_DIR``
-# the directory containing the Xalan headers
-# ``XalanC_LIBRARY``
-# the Xalan library
+#[=======================================================================[.rst:
+FindXalanC
+-----------
+
+Find the Apache Xalan-C++ XSL transform processor headers and libraries.
+
+Imported targets
+^^^^^^^^^^^^^^^^
+
+This module defines the following :prop_tgt:`IMPORTED` targets:
+
+``XalanC::XalanC``
+ The Xalan-C++ ``xalan-c`` library, if found.
+
+Result variables
+^^^^^^^^^^^^^^^^
+
+This module will set the following variables in your project:
+
+``XalanC_FOUND``
+ true if the Xalan headers and libraries were found
+``XalanC_VERSION``
+ Xalan release version
+``XalanC_INCLUDE_DIRS``
+ the directory containing the Xalan headers; note
+ ``XercesC_INCLUDE_DIRS`` is also required
+``XalanC_LIBRARIES``
+ Xalan libraries to be linked; note ``XercesC_LIBRARIES`` is also
+ required
+
+Cache variables
+^^^^^^^^^^^^^^^
+
+The following cache variables may also be set:
+
+``XalanC_INCLUDE_DIR``
+ the directory containing the Xalan headers
+``XalanC_LIBRARY``
+ the Xalan library
+#]=======================================================================]
# Written by Roger Leigh <rleigh@codelibre.net>
@@ -75,7 +76,7 @@ find_path(XalanC_INCLUDE_DIR
DOC "Xalan-C++ include directory")
mark_as_advanced(XalanC_INCLUDE_DIR)
-if(XalanC_INCLUDE_DIR)
+if(XalanC_INCLUDE_DIR AND EXISTS "${XalanC_INCLUDE_DIR}/xalanc/Include/XalanVersion.hpp")
_XalanC_GET_VERSION("${XalanC_INCLUDE_DIR}/xalanc/Include/XalanVersion.hpp")
endif()