Pārlūkot izejas kodu

gh-1160 Fix build error if Xalan built without ICU support

If Xalan was built without ICU support then libXalanMsg will not
exist. Add a check that the file exists before adding it to the
link dependencies.

This issue may cause build errors on Gentoo.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 13 gadi atpakaļ
vecāks
revīzija
bc4b0e168e
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      cmake_modules/FindXALAN.cmake

+ 3 - 1
cmake_modules/FindXALAN.cmake

@@ -66,7 +66,9 @@ IF (NOT XALAN_FOUND)
       set (XALAN_LIBRARIES optimized ${XALAN_LIBRARIES} debug ${XALAN_DEBUG_LIBRARIES})
     ELSE()
       STRING(REPLACE "xalan-c" "xalanMsg" XALAN_EXTRA_LIBRARIES "${XALAN_LIBRARIES}")
-      set (XALAN_LIBRARIES ${XALAN_LIBRARIES} ${XALAN_EXTRA_LIBRARIES})
+      IF (EXISTS ${XALAN_EXTRA_LIBRARIES})
+        set (XALAN_LIBRARIES ${XALAN_LIBRARIES} ${XALAN_EXTRA_LIBRARIES})
+      ENDIF()
     ENDIF()
   ENDIF()
   MARK_AS_ADVANCED(XALAN_INCLUDE_DIR XALAN_LIBRARIES)