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.

36 lines
1.5 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. set(XERCESC_LIBRARIES ${XERCES_LIBRARY_PATH}/libxerces-c.a)
  22. add_dependencies(resources xercesc)
  23. endif()
  24. message (STATUS "StoRM - Linking with xercesc")
  25. set(STORM_HAVE_XERCES ON)
  26. include_directories(${XERCESC_INCLUDE})
  27. if(APPLE)
  28. FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation )
  29. FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices )
  30. endif()
  31. find_package(CURL)
  32. list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${CURL_LIBRARIES})
  33. endif(USE_XERCES)