summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-04 10:36:21 -0500
committerBrad King <brad.king@kitware.com>2014-12-04 10:41:26 -0500
commit27141eede739fb4376a6fe2cec1b1171841bf7fb (patch)
treee15b310f33757a70785d5b2d3567f55b72dba37d /Modules
parent433c6d4689ca86f1a8d8d966be0204e98f95b968 (diff)
downloadcmake-27141eede739fb4376a6fe2cec1b1171841bf7fb.tar.gz
Modules: Rename FindXerces to FindXercesC
The FindXerces module was added in commit v3.1.0-rc1~155^2 (FindXerces: New module to find Apache Xerces-C++, 2014-08-17). However, there are two implementations of Xerces, one in C++: http://xerces.apache.org/xerces-c/ and one in Java: http://xerces.apache.org/xerces-j/ Rename FindXerces to FindXercesC to clarify that it is about the C++ implementation. While at it, add the missing CMake 3.1 release note about this module. Suggested-by: Erik Sjölund <erik.sjolund@gmail.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindXercesC.cmake (renamed from Modules/FindXerces.cmake)66
1 files changed, 33 insertions, 33 deletions
diff --git a/Modules/FindXerces.cmake b/Modules/FindXercesC.cmake
index 6c6007a1ea..5a8ea9de25 100644
--- a/Modules/FindXerces.cmake
+++ b/Modules/FindXercesC.cmake
@@ -1,21 +1,21 @@
#.rst:
-# FindXerces
-# ----------
+# FindXercesC
+# -----------
#
# Find the Apache Xerces-C++ validating XML parser headers and libraries.
#
# This module reports information about the Xerces installation in
# several variables. General variables::
#
-# Xerces_FOUND - true if the Xerces headers and libraries were found
-# Xerces_VERSION - Xerces release version
-# Xerces_INCLUDE_DIRS - the directory containing the Xerces headers
-# Xerces_LIBRARIES - Xerces libraries to be linked
+# XercesC_FOUND - true if the Xerces headers and libraries were found
+# XercesC_VERSION - Xerces release version
+# XercesC_INCLUDE_DIRS - the directory containing the Xerces headers
+# XercesC_LIBRARIES - Xerces libraries to be linked
#
# The following cache variables may also be set::
#
-# Xerces_INCLUDE_DIR - the directory containing the Xerces headers
-# Xerces_LIBRARY - the Xerces library
+# XercesC_INCLUDE_DIR - the directory containing the Xerces headers
+# XercesC_LIBRARY - the Xerces library
# Written by Roger Leigh <rleigh@codelibre.net>
@@ -32,54 +32,54 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-function(_Xerces_GET_VERSION version_hdr)
+function(_XercesC_GET_VERSION version_hdr)
file(STRINGS ${version_hdr} _contents REGEX "^[ \t]*#define XERCES_VERSION_.*")
if(_contents)
- string(REGEX REPLACE ".*#define XERCES_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" Xerces_MAJOR "${_contents}")
- string(REGEX REPLACE ".*#define XERCES_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" Xerces_MINOR "${_contents}")
- string(REGEX REPLACE ".*#define XERCES_VERSION_REVISION[ \t]+([0-9]+).*" "\\1" Xerces_PATCH "${_contents}")
+ string(REGEX REPLACE ".*#define XERCES_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" XercesC_MAJOR "${_contents}")
+ string(REGEX REPLACE ".*#define XERCES_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" XercesC_MINOR "${_contents}")
+ string(REGEX REPLACE ".*#define XERCES_VERSION_REVISION[ \t]+([0-9]+).*" "\\1" XercesC_PATCH "${_contents}")
- if(NOT Xerces_MAJOR MATCHES "^[0-9]+$")
+ if(NOT XercesC_MAJOR MATCHES "^[0-9]+$")
message(FATAL_ERROR "Version parsing failed for XERCES_VERSION_MAJOR!")
endif()
- if(NOT Xerces_MINOR MATCHES "^[0-9]+$")
+ if(NOT XercesC_MINOR MATCHES "^[0-9]+$")
message(FATAL_ERROR "Version parsing failed for XERCES_VERSION_MINOR!")
endif()
- if(NOT Xerces_PATCH MATCHES "^[0-9]+$")
+ if(NOT XercesC_PATCH MATCHES "^[0-9]+$")
message(FATAL_ERROR "Version parsing failed for XERCES_VERSION_REVISION!")
endif()
- set(Xerces_VERSION "${Xerces_MAJOR}.${Xerces_MINOR}.${Xerces_PATCH}" PARENT_SCOPE)
+ set(XercesC_VERSION "${XercesC_MAJOR}.${XercesC_MINOR}.${XercesC_PATCH}" PARENT_SCOPE)
else()
message(FATAL_ERROR "Include file ${version_hdr} does not exist or does not contain expected version information")
endif()
endfunction()
# Find include directory
-find_path(Xerces_INCLUDE_DIR
+find_path(XercesC_INCLUDE_DIR
NAMES "xercesc/util/PlatformUtils.hpp"
DOC "Xerces-C++ include directory")
-mark_as_advanced(Xerces_INCLUDE_DIR)
+mark_as_advanced(XercesC_INCLUDE_DIR)
-# Find all Xerces libraries
-find_library(Xerces_LIBRARY "xerces-c"
+# Find all XercesC libraries
+find_library(XercesC_LIBRARY "xerces-c"
DOC "Xerces-C++ libraries")
-mark_as_advanced(Xerces_LIBRARY)
+mark_as_advanced(XercesC_LIBRARY)
-if(Xerces_INCLUDE_DIR)
- _Xerces_GET_VERSION("${Xerces_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp")
+if(XercesC_INCLUDE_DIR)
+ _XercesC_GET_VERSION("${XercesC_INCLUDE_DIR}/xercesc/util/XercesVersion.hpp")
endif()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xerces
- FOUND_VAR Xerces_FOUND
- REQUIRED_VARS Xerces_LIBRARY
- Xerces_INCLUDE_DIR
- Xerces_VERSION
- VERSION_VAR Xerces_VERSION
- FAIL_MESSAGE "Failed to find Xerces")
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(XercesC
+ FOUND_VAR XercesC_FOUND
+ REQUIRED_VARS XercesC_LIBRARY
+ XercesC_INCLUDE_DIR
+ XercesC_VERSION
+ VERSION_VAR XercesC_VERSION
+ FAIL_MESSAGE "Failed to find XercesC")
-if(Xerces_FOUND)
- set(Xerces_INCLUDE_DIRS "${Xerces_INCLUDE_DIR}")
- set(Xerces_LIBRARIES "${Xerces_LIBRARY}")
+if(XercesC_FOUND)
+ set(XercesC_INCLUDE_DIRS "${XercesC_INCLUDE_DIR}")
+ set(XercesC_LIBRARIES "${XercesC_LIBRARY}")
endif()