From 8c77762e72e696049f2999406f8ac61bbc5f0365 Mon Sep 17 00:00:00 2001 From: Sebastian Junges Date: Wed, 23 Nov 2016 14:43:45 +0100 Subject: [PATCH] find xercesc is now provided by cmake, so we use that --- CMakeLists.txt | 2 +- resources/3rdparty/include_xerces.cmake | 15 +++++++-------- resources/cmake/find_modules/FindXerces.cmake | 10 +--------- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 766b0dd21..7a6f7a803 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.8.6) +cmake_minimum_required (VERSION 3.2) cmake_policy(VERSION 3.2) # Set project name diff --git a/resources/3rdparty/include_xerces.cmake b/resources/3rdparty/include_xerces.cmake index 65b2f43a0..834f697d2 100644 --- a/resources/3rdparty/include_xerces.cmake +++ b/resources/3rdparty/include_xerces.cmake @@ -1,7 +1,6 @@ if(USE_XERCESC) - set(XERCESC_FIND_QUIETLY ON) - find_package(Xerces QUIET REQUIRED) - if(XERCESC_FOUND) + find_package(XercesC QUIET) + if(XercesC_FOUND) message(STATUS "Storm - Use system version of xerces.") else() message(STATUS "Storm - Use shipped version of xerces.") @@ -20,13 +19,13 @@ if(USE_XERCESC) ) set(XERCESC_ROOT ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2) - set(XERCESC_INCLUDE ${XERCESC_ROOT}/include) + set(XercesC_INCLUDE_DIRS ${XERCESC_ROOT}/include) set(XERCESC_LIBRARY_PATH ${XERCESC_LIB_DIR}) if(BUILD_STATIC) - set(XERCESC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${STATIC_EXT}) + set(XercesC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${STATIC_EXT}) else() - set(XERCESC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT}) + set(XercesC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT}) endif() add_dependencies(resources xercesc) @@ -34,7 +33,7 @@ if(USE_XERCESC) message (STATUS "Storm - Linking with xercesc.") set(STORM_HAVE_XERCES ON) - include_directories(${XERCESC_INCLUDE}) + include_directories(${XercesC_INCLUDE_DIRS}) if(APPLE) FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation ) FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices ) @@ -42,7 +41,7 @@ if(USE_XERCESC) mark_as_advanced(CORESERVICES_LIBRARY) endif() find_package(CURL) - list(APPEND STORM_GSPN_LINK_LIBRARIES ${XERCESC_LIBRARIES} ${COREFOUNDATION_LIBRARY} ${CORESERVICES_LIBRARY} ${CURL_LIBRARIES}) + list(APPEND STORM_GSPN_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_XERCESC) diff --git a/resources/cmake/find_modules/FindXerces.cmake b/resources/cmake/find_modules/FindXerces.cmake index aa137b50c..f16483769 100644 --- a/resources/cmake/find_modules/FindXerces.cmake +++ b/resources/cmake/find_modules/FindXerces.cmake @@ -12,14 +12,6 @@ IF (XERCESC_INCLUDE AND XERCESC_LIBRARY) SET(XERCESC_FIND_QUIETLY TRUE) ENDIF (XERCESC_INCLUDE AND XERCESC_LIBRARY) -OPTION(XERCESC_STATIC "Set to ON to link your project with static library (instead of DLL)." ON) - -IF (NOT ${XERCESC_WAS_STATIC} STREQUAL ${XERCESC_STATIC}) - UNSET(XERCESC_LIBRARY CACHE) - UNSET(XERCESC_LIBRARY_DEBUG CACHE) -ENDIF (NOT ${XERCESC_WAS_STATIC} STREQUAL ${XERCESC_STATIC}) - -SET(XERCESC_WAS_STATIC ${XERCESC_STATIC} CACHE INTERNAL "" ) FIND_PATH(XERCESC_INCLUDE NAMES xercesc/util/XercesVersion.hpp PATHS @@ -101,4 +93,4 @@ IF(XERCESC_FOUND) ENDIF(XERCESC_FOUND) -MARK_AS_ADVANCED(XERCESC_INCLUDE XERCESC_LIBRARIES) \ No newline at end of file +MARK_AS_ADVANCED(XERCESC_INCLUDE XERCESC_LIBRARIES)