Deps: PugiXML 1.10

This separates out PugiXML that was previously
bundled by OIIO.

As this linux/mac libs are not available
this commit only contains the builder and windows
changes, and the option to enable pugixml is
guarded by a platform if, this can be removed
once all platforms have committed the svn libs.

For details see D8628
This commit is contained in:
Ray molenkamp 2020-11-29 14:01:33 -07:00
parent 176324aa5c
commit dca9aa0053
Notes: blender-bot 2023-02-14 05:53:38 +01:00
Referenced by commit f8d1378b84, Deps: Additional changes for PugiXML on macOS
Referenced by commit 33b7d53df0, Deps: Add PugiXML as an official dependency
8 changed files with 26 additions and 24 deletions

View File

@ -178,6 +178,9 @@ mark_as_advanced(BUILDINFO_OVERRIDE_TIME)
option(WITH_IK_ITASC "Enable ITASC IK solver (only disable for development & for incompatible C++ compilers)" ON)
option(WITH_IK_SOLVER "Enable Legacy IK solver (only disable for development)" ON)
option(WITH_FFTW3 "Enable FFTW3 support (Used for smoke, ocean sim, and audio effects)" ON)
if(WIN32)
option(WITH_PUGIXML "Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)" ON)
endif()
option(WITH_BULLET "Enable Bullet (Physics Engine)" ON)
option(WITH_SYSTEM_BULLET "Use the systems bullet library (currently unsupported due to missing features in upstream!)" )
mark_as_advanced(WITH_SYSTEM_BULLET)
@ -697,6 +700,10 @@ set_and_warn_dependency(WITH_BOOST WITH_OPENCOLORIO OFF)
set_and_warn_dependency(WITH_BOOST WITH_QUADRIFLOW OFF)
set_and_warn_dependency(WITH_BOOST WITH_USD OFF)
set_and_warn_dependency(WITH_BOOST WITH_ALEMBIC OFF)
if(WIN32)
set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF)
set_and_warn_dependency(WITH_PUGIXML WITH_OPENIMAGEIO OFF)
endif()
if(WITH_BOOST AND NOT (WITH_CYCLES OR WITH_OPENIMAGEIO OR WITH_INTERNATIONAL OR
WITH_OPENVDB OR WITH_OPENCOLORIO OR WITH_USD OR WITH_ALEMBIC))

View File

@ -94,11 +94,7 @@ include(cmake/usd.cmake)
include(cmake/potrace.cmake)
# Boost needs to be included after python.cmake due to the PYTHON_BINARY variable being needed.
include(cmake/boost.cmake)
if(UNIX)
# Rely on PugiXML compiled with OpenImageIO
else()
include(cmake/pugixml.cmake)
endif()
include(cmake/pugixml.cmake)
if((NOT APPLE) OR ("${CMAKE_OSX_ARCHITECTURES}" STREQUAL "x86_64"))
include(cmake/ispc.cmake)
include(cmake/openimagedenoise.cmake)

View File

@ -156,6 +156,8 @@ harvest(osl/lib osl/lib "*.a")
harvest(osl/shaders osl/shaders "*.h")
harvest(png/include png/include "*.h")
harvest(png/lib png/lib "*.a")
harvest(pugixml/include pugixml/include "*.hpp")
harvest(pugixml/lib pugixml/lib "*.a")
harvest(python/bin python/bin "python${PYTHON_SHORT_VERSION}m")
harvest(python/include python/include "*h")
harvest(python/lib python/lib "*")

View File

@ -112,6 +112,9 @@ set(OPENIMAGEIO_EXTRA_ARGS
-DOPENEXR_IEX_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}Iex${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DOPENEXR_ILMIMF_LIBRARY=${LIBDIR}/openexr/lib/${LIBPREFIX}IlmImf${OPENEXR_VERSION_POSTFIX}${LIBEXT}
-DSTOP_ON_WARNING=OFF
-DUSE_EXTERNAL_PUGIXML=ON
-DPUGIXML_LIBRARY=${LIBDIR}/pugixml/lib/${LIBPREFIX}pugixml${LIBEXT}
-DPUGIXML_INCLUDE_DIR=${LIBDIR}/pugixml/include/
${WEBP_FLAGS}
${OIIO_SIMD_FLAGS}
)
@ -134,6 +137,7 @@ add_dependencies(
external_jpeg
external_boost
external_tiff
external_pugixml
external_openjpeg${OPENJPEG_POSTFIX}
${WEBP_DEP}
)

View File

@ -78,14 +78,10 @@ set(OSL_EXTRA_ARGS
-DINSTALL_DOCS=OFF
${OSL_SIMD_FLAGS}
-DPARTIO_LIBRARIES=
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
if(WIN32)
set(OSL_EXTRA_ARGS
${OSL_EXTRA_ARGS}
-DPUGIXML_HOME=${LIBDIR}/pugixml
)
elseif(APPLE)
if(APPLE)
# Make symbol hiding consistent with OIIO which defaults to OFF,
# avoids linker warnings on macOS
set(OSL_EXTRA_ARGS
@ -114,17 +110,9 @@ add_dependencies(
external_zlib
external_flexbison
external_openimageio
external_pugixml
)
if(UNIX)
# 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

View File

@ -30,13 +30,13 @@ ExternalProject_Add(external_pugixml
if(WIN32)
if(BUILD_MODE STREQUAL Release)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml.lib
COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/pugixml ${HARVEST_TARGET}/pugixml
DEPENDEES install
)
endif()
if(BUILD_MODE STREQUAL Debug)
ExternalProject_Add_Step(external_pugixml after_install
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/osl/lib/pugixml_d.lib
COMMAND ${CMAKE_COMMAND} -E copy ${LIBDIR}/pugixml/lib/pugixml.lib ${HARVEST_TARGET}/pugixml/lib/pugixml_d.lib
DEPENDEES install
)
endif()

View File

@ -253,6 +253,11 @@ foreach(child ${children})
endif()
endforeach()
if(WITH_PUGIXML)
set(PUGIXML_LIBRARIES optimized ${LIBDIR}/pugixml/lib/pugixml.lib debug ${LIBDIR}/pugixml/lib/pugixml_d.lib)
set(PUGIXML_INCLUDE_DIR ${LIBDIR}/pugixml/include)
endif()
set(ZLIB_INCLUDE_DIRS ${LIBDIR}/zlib/include)
set(ZLIB_LIBRARIES ${LIBDIR}/zlib/lib/libz_st.lib)
set(ZLIB_INCLUDE_DIR ${LIBDIR}/zlib/include)
@ -651,11 +656,10 @@ if(WITH_CYCLES_OSL)
optimized ${OSL_LIB_COMP}
optimized ${OSL_LIB_EXEC}
optimized ${OSL_LIB_QUERY}
optimized ${CYCLES_OSL}/lib/pugixml.lib
debug ${OSL_LIB_EXEC_DEBUG}
debug ${OSL_LIB_COMP_DEBUG}
debug ${OSL_LIB_QUERY_DEBUG}
debug ${CYCLES_OSL}/lib/pugixml_d.lib
${PUGIXML_LIBRARIES}
)
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)

View File

@ -43,6 +43,7 @@ set(LIB
${OSL_LIBRARIES}
${OPENIMAGEIO_LIBRARIES}
${PUGIXML_LIBRARIES}
${LLVM_LIBRARY}
)