From 33b7d53df08aa7f3410aa0324e9e2a612514eade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 1 Dec 2020 16:24:19 +0100 Subject: [PATCH] Deps: Add PugiXML as an official dependency PugiXML was historically shipped hidden embedded into OIIO, the Grease Pencil team had a requirement for an XML library recently so pugi seems like a natural choice since it's not really a 'new' library, we just turn an implicit dependency into an explicit one. This commit expands the Windows-specific code in rBdca9aa0053f7 to include Linux. macOS support will be handled in a later commit. NOTE: run `cmake -U'*PUGIXML*' .` in the build directory to ensure CMake finds PugiXML in the new location. For details see D8628 --- CMakeLists.txt | 4 ++-- build_files/cmake/platform/platform_unix.cmake | 11 ++++------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 580aa1e8d79..7bc1406dc59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -178,7 +178,7 @@ 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) +if(NOT APPLE) option(WITH_PUGIXML "Enable PugiXML support (Used for OpenImageIO, Grease Pencil SVG export)" ON) endif() option(WITH_BULLET "Enable Bullet (Physics Engine)" ON) @@ -701,7 +701,7 @@ 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) +if(NOT APPLE) set_and_warn_dependency(WITH_PUGIXML WITH_CYCLES_OSL OFF) set_and_warn_dependency(WITH_PUGIXML WITH_OPENIMAGEIO OFF) endif() diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 97bd4981c22..c4d1383c767 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -350,15 +350,12 @@ if(WITH_BOOST) endif() endif() +if(WITH_PUGIXML) + find_package_wrapper(PugiXML) +endif() + if(WITH_OPENIMAGEIO) find_package_wrapper(OpenImageIO) - if(NOT OPENIMAGEIO_PUGIXML_FOUND AND WITH_CYCLES_STANDALONE) - find_package_wrapper(PugiXML) - else() - set(PUGIXML_INCLUDE_DIR "${OPENIMAGEIO_INCLUDE_DIR/OpenImageIO}") - set(PUGIXML_LIBRARIES "") - endif() - set(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARIES} ${PNG_LIBRARIES}