Browse Source

find xercesc is now provided by cmake, so we use that

tempestpy_adaptions
Sebastian Junges 8 years ago
parent
commit
8c77762e72
  1. 2
      CMakeLists.txt
  2. 15
      resources/3rdparty/include_xerces.cmake
  3. 8
      resources/cmake/find_modules/FindXerces.cmake

2
CMakeLists.txt

@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8.6)
cmake_minimum_required (VERSION 3.2)
cmake_policy(VERSION 3.2) cmake_policy(VERSION 3.2)
# Set project name # Set project name

15
resources/3rdparty/include_xerces.cmake

@ -1,7 +1,6 @@
if(USE_XERCESC) 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.") message(STATUS "Storm - Use system version of xerces.")
else() else()
message(STATUS "Storm - Use shipped version of xerces.") 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_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}) set(XERCESC_LIBRARY_PATH ${XERCESC_LIB_DIR})
if(BUILD_STATIC) if(BUILD_STATIC)
set(XERCESC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${STATIC_EXT})
set(XercesC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${STATIC_EXT})
else() else()
set(XERCESC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT})
set(XercesC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT})
endif() endif()
add_dependencies(resources xercesc) add_dependencies(resources xercesc)
@ -34,7 +33,7 @@ if(USE_XERCESC)
message (STATUS "Storm - Linking with xercesc.") message (STATUS "Storm - Linking with xercesc.")
set(STORM_HAVE_XERCES ON) set(STORM_HAVE_XERCES ON)
include_directories(${XERCESC_INCLUDE})
include_directories(${XercesC_INCLUDE_DIRS})
if(APPLE) if(APPLE)
FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation ) FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation )
FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices ) FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices )
@ -42,7 +41,7 @@ if(USE_XERCESC)
mark_as_advanced(CORESERVICES_LIBRARY) mark_as_advanced(CORESERVICES_LIBRARY)
endif() endif()
find_package(CURL) 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() else()
message (WARNING "Storm - Building without Xerces disables parsing XML formats (for GSPNs)") message (WARNING "Storm - Building without Xerces disables parsing XML formats (for GSPNs)")
endif(USE_XERCESC) endif(USE_XERCESC)

8
resources/cmake/find_modules/FindXerces.cmake

@ -12,14 +12,6 @@ IF (XERCESC_INCLUDE AND XERCESC_LIBRARY)
SET(XERCESC_FIND_QUIETLY TRUE) SET(XERCESC_FIND_QUIETLY TRUE)
ENDIF (XERCESC_INCLUDE AND XERCESC_LIBRARY) 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 FIND_PATH(XERCESC_INCLUDE NAMES xercesc/util/XercesVersion.hpp
PATHS PATHS

Loading…
Cancel
Save