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.

47 lines
2.1 KiB

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