From e0a809fb1d5ff0c79bd8f915bb8660f33ac5c512 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 15 Nov 2014 22:56:22 +0500 Subject: Cycles: Fix compilation error when OIIO is compiled with external PugiXML parser Basic idea is to check whether OIIO is compiled with embedded PugiXML parser and if so use PugiXML from OIIO, otherwise find a standalone PugiXML library. --- intern/cycles/cmake/external_libs.cmake | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'intern/cycles/cmake') diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake index 7f9a9e07487..537de2e7bc9 100644 --- a/intern/cycles/cmake/external_libs.cmake +++ b/intern/cycles/cmake/external_libs.cmake @@ -66,6 +66,12 @@ if(CYCLES_STANDALONE_REPOSITORY) #### # OpenImageIO find_package(OpenImageIO REQUIRED) + if(OPENIMAGEIO_PUGIXML_FOUND) + set(PUGIXML_INCLUDE_DIR "${OPENIMAGEIO_INCLUDE_DIR/OpenImageIO}") + set(PUGIXML_LIBRARIES "") + else() + find_package(PugiXML REQUIRED) + endif() # OIIO usually depends on OpenEXR, so find this library # but don't make it required. @@ -75,10 +81,12 @@ if(CYCLES_STANDALONE_REPOSITORY) # Boost set(__boost_packages filesystem regex system thread date_time) if(WITH_CYCLES_NETWORK) - list(APPEND __boost_packages serialization) + list(APPEND __boost_packages serialization) endif() if(WITH_CYCLES_OSL AND APPLE) - list(APPEND __boost_packages wave) + # TODO(sergey): This is because of the way how our precompiled + # libraries works, could be different for someone's else libs.. + list(APPEND __boost_packages wave) endif() find_package(Boost 1.48 COMPONENTS ${__boost_packages} REQUIRED) if(NOT Boost_FOUND) -- cgit v1.2.3