Browse Source

only build xerces if not found on the system

Former-commit-id: 88bb52a710
tempestpy_adaptions
sjunges 9 years ago
parent
commit
19f18e7fee
  1. 32
      resources/3rdparty/CMakeLists.txt
  2. 31
      resources/3rdparty/include_xerces.cmake

32
resources/3rdparty/CMakeLists.txt

@ -4,17 +4,7 @@ add_custom_target(test-resources)
set(STORM_3RDPARTY_SOURCE_DIR ${PROJECT_SOURCE_DIR}/resources/3rdparty)
set(STORM_3RDPARTY_BINARY_DIR ${PROJECT_BINARY_DIR}/resources/3rdparty)
ExternalProject_Add(
xercesc
SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/xercesc-3.1.2
CONFIGURE_COMMAND ${STORM_3RDPARTY_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 --libdir=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3
PREFIX ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2
BUILD_COMMAND make
BUILD_IN_SOURCE 0
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_INSTALL ON
)
ExternalProject_Add(
glpk
@ -385,25 +375,7 @@ endif(ENABLE_MSAT)
##
#############################################################
if(USE_XERCES)
find_package(Xerces QUIET REQUIRED)
if(XERCES_FOUND)
message(STATUS "StoRM - Use system version of xerces")
else()
message(STATUS "StoRM - 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)
add_dependencies(resources xercesc)
endif()
message (STATUS "StoRM - Linking with xercesc")
set(STORM_HAVE_XERCES ON)
include_directories(${XERCESC_INCLUDE})
list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES})
endif(USE_XERCES)
include(${STORM_3RDPARTY_SOURCE_DIR}/include_xerces.cmake)
#############################################################
##

31
resources/3rdparty/include_xerces.cmake

@ -0,0 +1,31 @@
if(USE_XERCES)
find_package(Xerces QUIET REQUIRED)
if(XERCES_FOUND)
message(STATUS "StoRM - Use system version of xerces")
else()
message(STATUS "StoRM - Use shipped version of xerces")
ExternalProject_Add(
xercesc
SOURCE_DIR ${STORM_3RDPARTY_SOURCE_DIR}/xercesc-3.1.2
CONFIGURE_COMMAND ${STORM_3RDPARTY_SOURCE_DIR}/xercesc-3.1.2/configure --prefix=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2 --libdir=${CMAKE_CURRENT_BINARY_DIR}/xercesc-3.1.2/lib CC=${CMAKE_C_COMPILER} CXX=${CMAKE_CXX_COMPILER} CFLAGS=-O3 CXXFLAGS=-O3
PREFIX ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2
BUILD_COMMAND make
BUILD_IN_SOURCE 0
LOG_CONFIGURE ON
LOG_BUILD ON
LOG_INSTALL ON
)
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)
add_dependencies(resources xercesc)
endif()
message (STATUS "StoRM - Linking with xercesc")
set(STORM_HAVE_XERCES ON)
include_directories(${XERCESC_INCLUDE})
list(APPEND STORM_LINK_LIBRARIES ${XERCESC_LIBRARIES})
endif(USE_XERCES)
Loading…
Cancel
Save