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.

48 lines
2.1 KiB

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