From eaaa36928a72550dac37b238e9a4457e9c18fe2d Mon Sep 17 00:00:00 2001 From: sjunges Date: Wed, 17 Feb 2016 19:03:54 +0100 Subject: [PATCH] prevent xercesc from being linked when no xml support is required Former-commit-id: 63bf3c1a71e1dba88e079d031d91b36facffd007 --- CMakeLists.txt | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a0e325669..9aee1ce75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -521,19 +521,21 @@ endif(ENABLE_MSAT) ## ############################################################# -find_package(Xerces) -if(NOT XERCES_FOUND) - message(STATUS "Use shipped version of xerces") - set(XERCES_ROOT ${CMAKE_BINARY_DIR}/resources/3rdparty/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) -endif() +if(STORM_SUPPORT_XML_INPUT_FORMATS) + find_package(Xerces) + if(NOT XERCES_FOUND) + message(STATUS "Use shipped version of xerces") + set(XERCES_ROOT ${CMAKE_BINARY_DIR}/resources/3rdparty/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) + endif() -set(STORM_HAVE_XERCES TRUE) -if(STORM_HAVE_XERCES) - include_directories(${XERCESC_INCLUDE}) - list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES}) + set(STORM_HAVE_XERCES TRUE) + if(STORM_HAVE_XERCES) + include_directories(${XERCESC_INCLUDE}) + list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES}) + endif() endif() #############################################################