Skip to content
Snippets Groups Projects

Draft: Update to Xerecx 3.3

Open Johannes Junggeburth requested to merge UpdateXercesC into main
1 unresolved thread
+ 9
9
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
#
# This module is used to set up XercesC for the project. Either by looking for
# it on the build machine, or by downloading it during the build itself.
@@ -22,7 +22,7 @@ if(GEOMODEL_USE_BUILTIN_XERCESC)
set(XercesC_LIBRARY "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/XercesCInstall/lib/${CMAKE_SHARED_LIBRARY_PREFIX}xerces-c${CMAKE_SHARED_LIBRARY_SUFFIX}" CACHE PATH "Path to the Xerces-C library file" FORCE )
set(XercesC_LIBRARIES "${XercesC_LIBRARY}" )
set(XercesC_LIBRARY_RELEASE "${XercesC_LIBRARY}" CACHE PATH "Path to the Xerces-C library" FORCE )
set(XercesC_VERSION "3.2.3" )
set(XercesC_VERSION "3.3.0" )
# Create the include directory already, otherwise CMake refuses to
# create the imported target.
@@ -33,15 +33,15 @@ if(GEOMODEL_USE_BUILTIN_XERCESC)
ExternalProject_Add( XercesCBuiltIn
PREFIX "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/XercesCBuild"
INSTALL_DIR "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/XercesCInstall"
URL "https://cern.ch/lcgpackages/tarFiles/sources/xerces-c-${XercesC_VERSION}.tar.gz"
URL_MD5 "a5fa4d920fce31c9ca3bfef241644494"
CONFIGURE_COMMAND
${CMAKE_COMMAND} -E env CXXFLAGS=-std=c++${CMAKE_CXX_STANDARD} <SOURCE_DIR>/configure --disable-static --prefix=<INSTALL_DIR>
URL "https://github.com/apache/xerces-c/archive/refs/tags/v${XercesC_VERSION}.tar.gz"
URL_MD5 "9662878f56e5bc1eb7a9b4c572d37a1d"
CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
INSTALL_COMMAND make install
COMMAND ${CMAKE_COMMAND} -E remove -f "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/XercesCInstall/lib/${CMAKE_SHARED_LIBRARY_PREFIX}xerces-c.la"
COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/XercesCInstall/lib/pkgconfig"
BUILD_BYPRODUCTS "${XercesC_INCLUDE_DIR}" "${XercesC_LIBRARY}" )
install(DIRECTORY
BUILD_BYPRODUCTS "${XercesC_INCLUDE_DIR}" "${XercesC_LIBRARY}" )
install(DIRECTORY
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/XercesCInstall/bin"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/XercesCInstall/lib"
DESTINATION .
@@ -53,7 +53,7 @@ if(GEOMODEL_USE_BUILTIN_XERCESC)
USE_SOURCE_PERMISSIONS )
# Set up local XercesC "imported" target.
add_library(XercesC::XercesC UNKNOWN IMPORTED)
add_library(XercesC::XercesC SHARED IMPORTED)
set_target_properties( XercesC::XercesC PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${XercesC_INCLUDE_DIR}"
IMPORTED_LOCATION "${XercesC_LIBRARY}")
Loading