diff --git a/CMakeLists.txt b/CMakeLists.txt index 23d821e8a..190f72228 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,7 +30,7 @@ option(STORM_USE_COTIRE "Sets whether Cotire should be used (for building precom option(LINK_LIBCXXABI "Sets whether libc++abi should be linked." OFF) option(USE_LIBCXX "Sets whether the standard library is libc++." OFF) option(USE_CARL "Sets whether carl should be included." ON) -option(USE_XERCES "Sets whether xerces should be used." OFF) +option(XML_SUPPORT "Sets whether xml based format parsing should be included." ON) option(FORCE_COLOR "Force color output" OFF) mark_as_advanced(FORCE_COLOR) option(STORM_PYTHON "Builds the API for Python" OFF) @@ -45,7 +45,8 @@ set(CUDA_ROOT "" CACHE STRING "The hint to the root directory of CUDA (optional) set(MSAT_ROOT "" CACHE STRING "The hint to the root directory of MathSAT (optional).") set(ADDITIONAL_INCLUDE_DIRS "" CACHE STRING "Additional directories added to the include directories.") set(ADDITIONAL_LINK_DIRS "" CACHE STRING "Additional directories added to the link directories.") - +set(USE_XERCES ${XML_SUPPORT}) +mark_as_advanced(USE_XERCES) # Set some CMAKE Variables as advanced mark_as_advanced(CMAKE_OSX_ARCHITECTURES) diff --git a/resources/3rdparty/include_xerces.cmake b/resources/3rdparty/include_xerces.cmake index 73f559cec..a90d11379 100644 --- a/resources/3rdparty/include_xerces.cmake +++ b/resources/3rdparty/include_xerces.cmake @@ -19,8 +19,11 @@ if(USE_XERCES) set(XERCES_ROOT ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2) set(XERCESC_INCLUDE ${XERCES_ROOT}/include) set(XERCES_LIBRARY_PATH ${XERCES_ROOT}/lib) - set(XERCESC_LIBRARIES ${XERCES_LIBRARY_PATH}/libxerces-c.a) - + if(BUILD_STATIC) + set(XERCESC_LIBRARIES ${XERCES_LIBRARY_PATH}/libxerces-c.a) + else() + set(XERCESC_LIBRARIES ${XERCES_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT}) + endif() add_dependencies(resources xercesc) endif() @@ -33,4 +36,6 @@ if(USE_XERCES) endif() find_package(CURL) list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${CURL_LIBRARIES}) +else() + message (WARNING "StoRM - Building without Xerces disables parsing XML formats (for GSPNs)") endif(USE_XERCES)