Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-11-15 20:56:22 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2014-12-31 23:31:07 +0300
commite0a809fb1d5ff0c79bd8f915bb8660f33ac5c512 (patch)
tree3a39f25111fe102d26a1838d7b23c702d752f7ba /intern
parenta4c3ca86715c972fa641f374d9cc01dea35a7fe1 (diff)
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.
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/CMakeLists.txt1
-rw-r--r--intern/cycles/app/CMakeLists.txt4
-rw-r--r--intern/cycles/cmake/external_libs.cmake12
-rw-r--r--intern/cycles/util/util_xml.h4
4 files changed, 17 insertions, 4 deletions
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 01912019d80..56deb8d0ea0 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -161,6 +161,7 @@ include_directories(
${OPENIMAGEIO_INCLUDE_DIRS}/OpenImageIO
${OPENEXR_INCLUDE_DIR}
${OPENEXR_INCLUDE_DIRS}
+ ${PUGIXML_INCLUDE_DIR}
)
# TODO(sergey): Adjust so standalone repository is also happy.
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt
index 3af72ac4431..0694be0321a 100644
--- a/intern/cycles/app/CMakeLists.txt
+++ b/intern/cycles/app/CMakeLists.txt
@@ -32,6 +32,10 @@ set(LIBRARIES
extern_cuew
)
+if(NOT PUGIXML_LIBRARIES STREQUAL "")
+ list(APPEND LIBRARIES ${PUGIXML_LIBRARIES})
+endif()
+
if(NOT CYCLES_STANDALONE_REPOSITORY)
list(APPEND LIBRARIES bf_intern_glew_mx)
endif()
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)
diff --git a/intern/cycles/util/util_xml.h b/intern/cycles/util/util_xml.h
index d1b4ee1f2d3..cfd0afc95f7 100644
--- a/intern/cycles/util/util_xml.h
+++ b/intern/cycles/util/util_xml.h
@@ -17,9 +17,9 @@
#ifndef __UTIL_XML_H__
#define __UTIL_XML_H__
-/* PugiXML from OpenImageIO is used for XML parsing. */
+/* PugiXML is used for XML parsing. */
-#include <OpenImageIO/pugixml.hpp>
+#include <pugixml.hpp>
CCL_NAMESPACE_BEGIN