[Bf-blender-cvs] [d93558e9148] master: Make deps: Fix detection/linking of PugiXML on Linux
Sergey Sharybin
noreply at git.blender.org
Wed Jun 26 19:53:34 CEST 2019
Commit: d93558e91488f1c110a3a2e2e3399e2917f77e13
Author: Sergey Sharybin
Date: Wed Jun 26 19:50:38 2019 +0200
Branches: master
https://developer.blender.org/rBd93558e91488f1c110a3a2e2e3399e2917f77e13
Make deps: Fix detection/linking of PugiXML on Linux
This time both full `make deps` and final compilation is tested on
a freshly installed CentOS 7.
The thing is: OpenImageIO is not configured to use an external PugiXML
library, so it was compiling its own.
At the same time the OpenShadingLanguage library was commanded to use
an externally compiled PugiXML. This caused some sort of discrepancy
which lead to Blender-link-time errors. Could be linking error, could
be namespace related, could be ABI related. In any case since we do
have PugiXML in the OpenImageIO already lets just stick to it.
===================================================================
M build_files/build_environment/CMakeLists.txt
M build_files/build_environment/cmake/osl.cmake
===================================================================
diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt
index c21ed826736..e4fe7d90176 100644
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@ -91,7 +91,11 @@ include(cmake/openvdb.cmake)
include(cmake/python.cmake)
include(cmake/python_site_packages.cmake)
include(cmake/numpy.cmake)
-include(cmake/pugixml.cmake)
+if(UNIX AND NOT APPLE)
+ # Rely on PugiXML compiled with OpenImageIO
+else()
+ include(cmake/pugixml.cmake)
+endif()
if(WITH_WEBP)
include(cmake/webp.cmake)
diff --git a/build_files/build_environment/cmake/osl.cmake b/build_files/build_environment/cmake/osl.cmake
index 7b5909e3700..b8268f90c33 100644
--- a/build_files/build_environment/cmake/osl.cmake
+++ b/build_files/build_environment/cmake/osl.cmake
@@ -81,11 +81,6 @@ if(WIN32)
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
-elseif(UNIX AND NOT APPLE)
- set(OSL_EXTRA_ARGS
- ${OSL_EXTRA_ARGS}
- -DPUGIXML_HOME=${LIBDIR}/pugixml
- )
elseif(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
@@ -116,9 +111,17 @@ add_dependencies(
external_zlib
external_flexbison
external_openimageio
- external_pugixml
)
+if(UNIX AND NOT APPLE)
+ # Rely on PugiXML compiled with OpenImageIO
+else()
+ add_dependencies(
+ external_osl
+ external_pugixml
+ )
+endif()
+
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_osl after_install
More information about the Bf-blender-cvs
mailing list