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.

49 lines
2.1 KiB

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