You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.8 KiB

  1. if(USE_XERCES)
  2. find_package(Xerces QUIET REQUIRED)
  3. if(XERCES_FOUND)
  4. message(STATUS "StoRM - Use system version of xerces")
  5. else()
  6. message(STATUS "StoRM - Use shipped version of xerces")
  7. ExternalProject_Add(
  8. xercesc
  9. SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/xercesc-3.1.2
  10. CONFIGURE_COMMAND ${STORM_3RDPARTY_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2 --libdir=${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3
  11. PREFIX ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2
  12. BUILD_COMMAND make
  13. BUILD_IN_SOURCE 0
  14. LOG_CONFIGURE ON
  15. LOG_BUILD ON
  16. LOG_INSTALL ON
  17. )
  18. set(XERCES_ROOT ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2)
  19. set(XERCESC_INCLUDE ${XERCES_ROOT}/include)
  20. set(XERCES_LIBRARY_PATH ${XERCES_ROOT}/lib)
  21. if(BUILD_STATIC)
  22. set(XERCESC_LIBRARIES ${XERCES_LIBRARY_PATH}/libxerces-c.a)
  23. else()
  24. set(XERCESC_LIBRARIES ${XERCES_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT})
  25. endif()
  26. add_dependencies(resources xercesc)
  27. endif()
  28. message (STATUS "StoRM - Linking with xercesc")
  29. set(STORM_HAVE_XERCES ON)
  30. include_directories(${XERCESC_INCLUDE})
  31. if(APPLE)
  32. FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation )
  33. FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices )
  34. endif()
  35. find_package(CURL)
  36. list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${CURL_LIBRARIES})
  37. else()
  38. message (WARNING "StoRM - Building without Xerces disables parsing XML formats (for GSPNs)")
  39. endif(USE_XERCES)