From 5159ba6b333b27b247ffe0b950fa40c1dd7d2654 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 27 Mar 2020 14:24:52 +0100 Subject: Fix (harmless) PCRE not found warning when configuring CMake on Linux Differential Revision: https://developer.blender.org/D7309 --- build_files/cmake/platform/platform_apple.cmake | 6 ++---- build_files/cmake/platform/platform_unix.cmake | 10 ++++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'build_files/cmake/platform') diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 620a078f412..f5f8c209d9d 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -222,12 +222,10 @@ if(WITH_OPENCOLLADA) -lMathMLSolver -lGeneratedSaxParser -lbuffer -lftoa -lUTF - ${OPENCOLLADA_LIBPATH}/libxml2.a ) - # PCRE is bundled with openCollada - # set(PCRE ${LIBDIR}/pcre) - # set(PCRE_LIBPATH ${PCRE}/lib) + # PCRE and XML2 are bundled with OpenCollada. set(PCRE_LIBRARIES pcre) + set(XML2_LIBRARIES xml2) endif() if(WITH_SDL) diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index c034e7028af..3f73916daf3 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -195,8 +195,14 @@ endif() if(WITH_OPENCOLLADA) find_package_wrapper(OpenCOLLADA) if(OPENCOLLADA_FOUND) - find_package_wrapper(XML2) - find_package_wrapper(PCRE) + if(WITH_STATIC_LIBS) + # PCRE and XML2 are bundled with OpenCollada. + set(PCRE_LIBRARIES pcre) + set(XML2_LIBRARIES xml2) + else() + find_package_wrapper(XML2) + find_package_wrapper(PCRE) + endif() else() set(WITH_OPENCOLLADA OFF) endif() -- cgit v1.2.3