dehnert
8 years ago
4 changed files with 12 additions and 157 deletions
-
24resources/3rdparty/include_xerces.cmake
-
0resources/3rdparty/include_xerces.cmake.save
-
49resources/3rdparty/include_xerces.cmake.save.1
-
96resources/cmake/find_modules/FindXerces.cmake
@ -1,49 +0,0 @@ |
|||
if(USE_XERCESC) |
|||
set(XERCESC_FIND_QUIETLY ON) |
|||
set(XERCESC_STATIC OFF) |
|||
find_package(XercesC QUIET REQUIRED) |
|||
if(XERCESC_FOUND) |
|||
message(STATUS "Storm - Use system version of xerces.") |
|||
else() |
|||
message(STATUS "Storm - Use shipped version of xerces.") |
|||
set(XERCESC_LIB_DIR ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2/lib) |
|||
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=${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2 --libdir=${XERCESC_LIB_DIR} 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 |
|||
BUILD_BYPRODUCTS ${XERCESC_LIB_DIR}/libxerces-c${DYNAMIC_EXT} ${XERCESC_LIB_DIR}/libxerces-c${STATIC_EXT} |
|||
) |
|||
|
|||
set(XERCESC_ROOT ${STORM_3RDPARTY_BINARY_DIR}/xercesc-3.1.2) |
|||
set(XERCESC_INCLUDE ${XERCESC_ROOT}/include) |
|||
set(XERCESC_LIBRARY_PATH ${XERCESC_LIB_DIR}) |
|||
|
|||
if(BUILD_STATIC) |
|||
set(XERCESC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${STATIC_EXT}) |
|||
else() |
|||
set(XERCESC_LIBRARIES ${XERCESC_LIBRARY_PATH}/libxerces-c${DYNAMIC_EXT}) |
|||
endif() |
|||
|
|||
add_dependencies(resources xercesc) |
|||
endif() |
|||
|
|||
message (STATUS "Storm - Linking with xercesc.") |
|||
set(STORM_HAVE_XERCES ON) |
|||
include_directories(${XERCESC_INCLUDE}) |
|||
if(APPLE) |
|||
FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation ) |
|||
FIND_LIBRARY(CORESERVICES_LIBRARY CoreServices ) |
|||
mark_as_advanced(COREFOUNDATION_LIBRARY) |
|||
mark_as_advanced(CORESERVICES_LIBRARY) |
|||
endif() |
|||
find_package(CURL) |
|||
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) |
@ -1,96 +0,0 @@ |
|||
# From https://code.google.com/p/libcitygml/source/browse/trunk/CMakeModules/FindXerces.cmake?r=95 |
|||
# - Try to find Xerces-C |
|||
# Once done this will define |
|||
# |
|||
# XERCESC_FOUND - system has Xerces-C |
|||
# XERCESC_INCLUDE - the Xerces-C include directory |
|||
# XERCESC_LIBRARY - Link these to use Xerces-C |
|||
# XERCESC_VERSION - Xerces-C found version |
|||
|
|||
IF (XERCESC_INCLUDE AND XERCESC_LIBRARY) |
|||
# in cache already |
|||
SET(XERCESC_FIND_QUIETLY TRUE) |
|||
ENDIF (XERCESC_INCLUDE AND XERCESC_LIBRARY) |
|||
|
|||
|
|||
FIND_PATH(XERCESC_INCLUDE NAMES xercesc/util/XercesVersion.hpp |
|||
PATHS |
|||
$ENV{XERCESC_INCLUDE_DIR} |
|||
${XERCESC_INCLUDE_DIR} |
|||
/usr/local/include |
|||
/usr/include |
|||
) |
|||
|
|||
IF (XERCESC_STATIC) |
|||
FIND_LIBRARY(XERCESC_LIBRARIES NAMES xerces-c_static_3 xerces-c-3.1 xerces-c |
|||
PATHS |
|||
$ENV{XERCESC_LIBRARY_DIR} |
|||
${XERCESC_LIBRARY_DIR} |
|||
/usr/lib |
|||
/usr/local/lib |
|||
) |
|||
FIND_LIBRARY(XERCESC_LIBRARIES_DEBUG NAMES xerces-c_static_3D xerces-c-3.1D |
|||
PATHS |
|||
$ENV{XERCESC_LIBRARY_DIR} |
|||
${XERCESC_LIBRARY_DIR} |
|||
/usr/lib |
|||
/usr/local/lib |
|||
) |
|||
ADD_DEFINITIONS( -DXERCES_STATIC_LIBRARY ) |
|||
ELSE (XERCESC_STATIC) |
|||
FIND_LIBRARY(XERCESC_LIBRARY NAMES xerces-c_3 |
|||
PATHS |
|||
$ENV{XERCESC_LIBRARY_DIR} |
|||
${XERCESC_LIBRARY_DIR} |
|||
) |
|||
FIND_LIBRARY(XERCESC_LIBRARIES_DEBUG NAMES xerces-c_3D |
|||
PATHS |
|||
$ENV{XERCESC_LIBRARY_DIR} |
|||
${XERCESC_LIBRARY_DIR} |
|||
) |
|||
ENDIF (XERCESC_STATIC) |
|||
|
|||
IF (XERCESC_INCLUDE AND XERCESC_LIBRARIES) |
|||
SET(XERCESC_FOUND TRUE) |
|||
ELSE (XERCESC_INCLUDE AND XERCESC_LIBRARIES) |
|||
SET(XERCESC_FOUND FALSE) |
|||
ENDIF (XERCESC_INCLUDE AND XERCESC_LIBRARIES) |
|||
|
|||
IF(XERCESC_FOUND) |
|||
|
|||
FIND_PATH(XERCESC_XVERHPPPATH NAMES XercesVersion.hpp PATHS |
|||
${XERCESC_INCLUDE} |
|||
PATH_SUFFIXES xercesc/util) |
|||
|
|||
IF ( ${XERCESC_XVERHPPPATH} STREQUAL XERCESC_XVERHPPPATH-NOTFOUND ) |
|||
SET(XERCES_VERSION "0") |
|||
ELSE( ${XERCESC_XVERHPPPATH} STREQUAL XERCESC_XVERHPPPATH-NOTFOUND ) |
|||
FILE(READ ${XERCESC_XVERHPPPATH}/XercesVersion.hpp XVERHPP) |
|||
|
|||
STRING(REGEX MATCHALL "\n *#define XERCES_VERSION_MAJOR +[0-9]+" XVERMAJ |
|||
${XVERHPP}) |
|||
STRING(REGEX MATCH "\n *#define XERCES_VERSION_MINOR +[0-9]+" XVERMIN |
|||
${XVERHPP}) |
|||
STRING(REGEX MATCH "\n *#define XERCES_VERSION_REVISION +[0-9]+" XVERREV |
|||
${XVERHPP}) |
|||
|
|||
STRING(REGEX REPLACE "\n *#define XERCES_VERSION_MAJOR +" "" |
|||
XVERMAJ ${XVERMAJ}) |
|||
STRING(REGEX REPLACE "\n *#define XERCES_VERSION_MINOR +" "" |
|||
XVERMIN ${XVERMIN}) |
|||
STRING(REGEX REPLACE "\n *#define XERCES_VERSION_REVISION +" "" |
|||
XVERREV ${XVERREV}) |
|||
|
|||
SET(XERCESC_VERSION ${XVERMAJ}.${XVERMIN}.${XVERREV}) |
|||
|
|||
ENDIF ( ${XERCESC_XVERHPPPATH} STREQUAL XERCESC_XVERHPPPATH-NOTFOUND ) |
|||
|
|||
IF(NOT XERCESC_FIND_QUIETLY) |
|||
MESSAGE(STATUS "Found Xerces-C: ${XERCESC_LIBRARY}") |
|||
MESSAGE(STATUS " : ${XERCESC_INCLUDE}") |
|||
MESSAGE(STATUS " Version: ${XERCESC_VERSION}") |
|||
ENDIF(NOT XERCESC_FIND_QUIETLY) |
|||
ENDIF(XERCESC_FOUND) |
|||
|
|||
|
|||
MARK_AS_ADVANCED(XERCESC_INCLUDE XERCESC_LIBRARIES) |
Write
Preview
Loading…
Cancel
Save
Reference in new issue