- xerces fix for cmake compile if static libs are missing

This commit is contained in:
Mark Vejvoda
2011-03-20 15:26:07 +00:00
parent 28516971af
commit 604de5bec1

View File

@@ -70,11 +70,18 @@ IF (XERCESC_STATIC)
/usr/lib /usr/lib
/usr/local/lib /usr/local/lib
) )
IF(XERCESC_FOUND)
ADD_DEFINITIONS( -DXERCES_STATIC_LIBRARY ) ADD_DEFINITIONS( -DXERCES_STATIC_LIBRARY )
IF(UNIX AND NOT APPLE) IF(UNIX AND NOT APPLE)
SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY} -Bdynamic -licuuc -licudata") SET(XERCESC_LIBRARY "-Bstatic ${XERCESC_LIBRARY} -Bdynamic -licuuc -licudata")
ENDIF() ENDIF()
ELSE (XERCESC_STATIC) ENDIF()
ENDIF()
IF(XERCESC_FOUND)
ELSE()
FIND_LIBRARY(XERCESC_LIBRARY NAMES xerces-c_3 xerces-c xerces-c_3 xerces-c2_8_0 xerces-c_2 Xerces FIND_LIBRARY(XERCESC_LIBRARY NAMES xerces-c_3 xerces-c xerces-c_3 xerces-c2_8_0 xerces-c_2 Xerces
PATHS PATHS
$ENV{XERCESC_LIBRARY_DIR} $ENV{XERCESC_LIBRARY_DIR}
@@ -85,7 +92,7 @@ ELSE (XERCESC_STATIC)
$ENV{XERCESC_LIBRARY_DIR} $ENV{XERCESC_LIBRARY_DIR}
${XERCESC_LIBRARY_DIR} ${XERCESC_LIBRARY_DIR}
) )
ENDIF (XERCESC_STATIC) ENDIF()
IF (XERCESC_INCLUDE AND XERCESC_LIBRARY) IF (XERCESC_INCLUDE AND XERCESC_LIBRARY)
SET(XERCESC_FOUND TRUE) SET(XERCESC_FOUND TRUE)