[Bf-blender-cvs] [0dd3f3925b4] soc-2019-openxr: Remove bundled OpenXR-SDK sources from extern/

Julian Eisel noreply at git.blender.org
Thu Aug 15 15:42:55 CEST 2019


Commit: 0dd3f3925b42b4119a2f5152d0a001883590122a
Author: Julian Eisel
Date:   Thu Aug 15 15:37:03 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rB0dd3f3925b42b4119a2f5152d0a001883590122a

Remove bundled OpenXR-SDK sources from extern/

Removes the OPENXR_USE_BUNDLED_SRC option which allowed using the
OpenXR-SDK sources bundled in extern/. It would be too much hassle to
keept these updated.
Now these have to be provided on the system Blender is compiled on. I've
already added necessary bits to install_deps.sh and our Windows
maintainer is ready to provide builds with OpenXR-SDK linked.
Once this gets into master, platform maintainers will have to be
notified about the added dependency.

This also removes the JsonCpp dependency, it was only needed for the
OpenXR-SDK sources.

===================================================================

M	CMakeLists.txt
M	extern/CMakeLists.txt
D	extern/jsoncpp/CMakeLists.txt
D	extern/jsoncpp/include/json/allocator.h
D	extern/jsoncpp/include/json/assertions.h
D	extern/jsoncpp/include/json/autolink.h
D	extern/jsoncpp/include/json/config.h
D	extern/jsoncpp/include/json/features.h
D	extern/jsoncpp/include/json/forwards.h
D	extern/jsoncpp/include/json/json.h
D	extern/jsoncpp/include/json/reader.h
D	extern/jsoncpp/include/json/value.h
D	extern/jsoncpp/include/json/version.h
D	extern/jsoncpp/include/json/writer.h
D	extern/jsoncpp/src/CMakeLists.txt
D	extern/jsoncpp/src/json_reader.cpp
D	extern/jsoncpp/src/json_tool.h
D	extern/jsoncpp/src/json_value.cpp
D	extern/jsoncpp/src/json_valueiterator.inl
D	extern/jsoncpp/src/json_writer.cpp
D	extern/jsoncpp/src/sconscript
D	extern/jsoncpp/src/version.h.in
D	extern/openxr/CMakeLists.txt
D	extern/openxr/LICENSE
D	extern/openxr/include/CMakeLists.txt
D	extern/openxr/include/openxr/CMakeLists.txt
D	extern/openxr/include/openxr/openxr.h
D	extern/openxr/include/openxr/openxr_platform.h
D	extern/openxr/include/openxr/openxr_platform_defines.h
D	extern/openxr/include/openxr/openxr_reflection.h
D	extern/openxr/src/CMakeLists.txt
D	extern/openxr/src/api_layers/CMakeLists.txt
D	extern/openxr/src/api_layers/XrApiLayer_core_validation.def
D	extern/openxr/src/api_layers/XrApiLayer_core_validation.json
D	extern/openxr/src/api_layers/api_layer_platform_defines.h
D	extern/openxr/src/api_layers/core_validation.cpp
D	extern/openxr/src/api_layers/validation_utils.h
D	extern/openxr/src/api_layers/xr_generated_core_validation.cpp
D	extern/openxr/src/api_layers/xr_generated_core_validation.hpp
D	extern/openxr/src/cmake/FindVulkanHeaders.cmake
D	extern/openxr/src/cmake/cmake_uninstall.cmake.in
D	extern/openxr/src/cmake/presentation.cmake
D	extern/openxr/src/common/extra_algorithms.h
D	extern/openxr/src/common/filesystem_utils.cpp
D	extern/openxr/src/common/filesystem_utils.hpp
D	extern/openxr/src/common/hex_and_handles.cpp
D	extern/openxr/src/common/hex_and_handles.h
D	extern/openxr/src/common/loader_interfaces.h
D	extern/openxr/src/common/platform_utils.hpp
D	extern/openxr/src/common/xr_dependencies.h
D	extern/openxr/src/common/xr_linear.h
D	extern/openxr/src/common_cmake_config.h.in
D	extern/openxr/src/loader/CMakeLists.txt
D	extern/openxr/src/loader/api_layer_interface.cpp
D	extern/openxr/src/loader/api_layer_interface.hpp
D	extern/openxr/src/loader/exception_handling.hpp
D	extern/openxr/src/loader/loader.rc
D	extern/openxr/src/loader/loader_core.cpp
D	extern/openxr/src/loader/loader_instance.cpp
D	extern/openxr/src/loader/loader_instance.hpp
D	extern/openxr/src/loader/loader_logger.cpp
D	extern/openxr/src/loader/loader_logger.hpp
D	extern/openxr/src/loader/loader_logger_recorders.cpp
D	extern/openxr/src/loader/loader_logger_recorders.hpp
D	extern/openxr/src/loader/loader_platform.hpp
D	extern/openxr/src/loader/manifest_file.cpp
D	extern/openxr/src/loader/manifest_file.hpp
D	extern/openxr/src/loader/openxr.pc.in
D	extern/openxr/src/loader/runtime_interface.cpp
D	extern/openxr/src/loader/runtime_interface.hpp
D	extern/openxr/src/loader/xr_generated_loader.cpp
D	extern/openxr/src/loader/xr_generated_loader.hpp
D	extern/openxr/src/version.cmake
D	extern/openxr/src/xr_generated_dispatch_table.c
D	extern/openxr/src/xr_generated_dispatch_table.h
D	extern/openxr/src/xr_generated_utilities.c
D	extern/openxr/src/xr_generated_utilities.h
M	intern/ghost/CMakeLists.txt

===================================================================

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ad68f8bca8..bb6e145520f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -236,13 +236,10 @@ mark_as_advanced(WITH_SYSTEM_BULLET)
 option(WITH_OPENCOLORIO   "Enable OpenColorIO color management" ${_init_OPENCOLORIO})
 option(WITH_OPENXR        "Enable VR features through the OpenXR specification" ON)
 if(WITH_OPENXR)
-  option(OPENXR_USE_BUNDLED_SRC "Compile using the bundled OpenXR SDK sources (otherwise it has to be compiled manually)" ON)
-  if(NOT OPENXR_USE_BUNDLED_SRC)
-    find_package(OpenXR-SDK)
-    if(NOT OPENXR_SDK_FOUND)
-      message(WARNING "OpenXR-SDK was not found, disabling WITH_OPENXR")
-      set(WITH_OPENXR OFF)
-    endif()
+  find_package(OpenXR-SDK)
+  if(NOT OPENXR_SDK_FOUND)
+    message(WARNING "OpenXR-SDK was not found, disabling WITH_OPENXR")
+    set(WITH_OPENXR OFF)
   endif()
 endif()
 
diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt
index 104ac4307ca..3b2a8c172aa 100644
--- a/extern/CMakeLists.txt
+++ b/extern/CMakeLists.txt
@@ -105,8 +105,3 @@ if(WITH_AUDASPACE AND NOT WITH_SYSTEM_AUDASPACE)
   set(AUDASPACE_CMAKE_CFG ${CMAKE_CURRENT_SOURCE_DIR}/audaspace/blender_config.cmake)
   add_subdirectory(audaspace)
 endif()
-
-if(WITH_OPENXR AND OPENXR_USE_BUNDLED_SRC)
-  add_subdirectory(jsoncpp)
-  add_subdirectory(openxr)
-endif()
diff --git a/extern/jsoncpp/CMakeLists.txt b/extern/jsoncpp/CMakeLists.txt
deleted file mode 100644
index 2890433dbce..00000000000
--- a/extern/jsoncpp/CMakeLists.txt
+++ /dev/null
@@ -1,20 +0,0 @@
-# ***** BEGIN GPL LICENSE BLOCK *****
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-#
-# All rights reserved.
-# ***** END GPL LICENSE BLOCK *****
-
-add_subdirectory(src)
diff --git a/extern/jsoncpp/include/json/allocator.h b/extern/jsoncpp/include/json/allocator.h
deleted file mode 100644
index 2492758cd71..00000000000
--- a/extern/jsoncpp/include/json/allocator.h
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef CPPTL_JSON_ALLOCATOR_H_INCLUDED
-#define CPPTL_JSON_ALLOCATOR_H_INCLUDED
-
-#include <cstring>
-#include <memory>
-
-#pragma pack(push, 8)
-
-namespace Json {
-template<typename T>
-class SecureAllocator {
-	public:
-		// Type definitions
-		using value_type      = T;
-		using pointer         = T*;
-		using const_pointer   = const T*;
-		using reference       = T&;
-		using const_reference = const T&;
-		using size_type       = std::size_t;
-		using difference_type = std::ptrdiff_t;
-
-		/**
-		 * Allocate memory for N items using the standard allocator.
-		 */
-		pointer allocate(size_type n) {
-			// allocate using "global operator new"
-			return static_cast<pointer>(::operator new(n * sizeof(T)));
-		}
-
-		/**
-		 * Release memory which was allocated for N items at pointer P.
-		 *
-		 * The memory block is filled with zeroes before being released.
-		 * The pointer argument is tagged as "volatile" to prevent the
-		 * compiler optimizing out this critical step.
-		 */
-		void deallocate(volatile pointer p, size_type n) {
-			std::memset(p, 0, n * sizeof(T));
-			// free using "global operator delete"
-			::operator delete(p);
-		}
-
-		/**
-		 * Construct an item in-place at pointer P.
-		 */
-		template<typename... Args>
-		void construct(pointer p, Args&&... args) {
-			// construct using "placement new" and "perfect forwarding"
-			::new (static_cast<void*>(p)) T(std::forward<Args>(args)...);
-		}
-
-		size_type max_size() const {
-			return size_t(-1) / sizeof(T);
-		}
-
-		pointer address( reference x ) const {
-			return std::addressof(x);
-		}
-
-		const_pointer address( const_reference x ) const {
-			return std::addressof(x);
-		}
-
-		/**
-		 * Destroy an item in-place at pointer P.
-		 */
-		void destroy(pointer p) {
-			// destroy using "explicit destructor"
-			p->~T();
-		}
-
-		// Boilerplate
-		SecureAllocator() {}
-		template<typename U> SecureAllocator(const SecureAllocator<U>&) {}
-		template<typename U> struct rebind { using other = SecureAllocator<U>; };
-};
-
-
-template<typename T, typename U>
-bool operator==(const SecureAllocator<T>&, const SecureAllocator<U>&) {
-	return true;
-}
-
-template<typename T, typename U>
-bool operator!=(const SecureAllocator<T>&, const SecureAllocator<U>&) {
-	return false;
-}
-
-} //namespace Json
-
-#pragma pack(pop)
-
-#endif // CPPTL_JSON_ALLOCATOR_H_INCLUDED
diff --git a/extern/jsoncpp/include/json/assertions.h b/extern/jsoncpp/include/json/assertions.h
deleted file mode 100644
index 9c5f8bc0fe5..00000000000
--- a/extern/jsoncpp/include/json/assertions.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
-#define CPPTL_JSON_ASSERTIONS_H_INCLUDED
-
-#include <stdlib.h>
-#include <sstream>
-
-#if !defined(JSON_IS_AMALGAMATION)
-#include "config.h"
-#endif // if !defined(JSON_IS_AMALGAMATION)
-
-/** It should not be possible for a maliciously designed file to
- *  cause an abort() or seg-fault, so these macros are used only
- *  for pre-condition violations and internal logic errors.
- */
-#if JSON_USE_EXCEPTION
-
-// @todo <= add detail about condition in exception
-# define JSON_ASSERT(condition)                                                \
-  {if (!(condition)) {Json::throwLogicError( "assert json failed" );}}
-
-# define JSON_FAIL_MESSAGE(message)                                            \
-  {                                                                            \
-    JSONCPP_OSTRINGSTREAM oss; oss << message;                                    \
-    Json::throwLogicError(oss.str());                                          \
-    abort();                                                                   \
-  }
-
-#else // JSON_USE_EXCEPTION
-
-# define JSON_ASSERT(condition) assert(condition)
-
-// The call to assert() will show the failure message in debug builds. In
-// release builds we abort, for a core-dump or debugger.
-# define JSON_FAIL_MESSAGE(message)                                            \
-  {                                                                            \
-    JSONCPP_OSTRINGSTREAM oss; oss << message;                                    \
-    assert(false && oss.str().c_str());                                        \
-    abort();                                                                   \
-  }
-
-
-#endif
-
-#define JSON_ASSERT_MESSAGE(condition, message)                                \
-  if (!(condition)) {                                                          \
-    JSON_FAIL_MESSAGE(message);                                                \
-  }
-
-#endif // CPPTL_JSON_ASSERTIONS_H_INCLUDED
diff --git a/extern/jsoncpp/include/json/autolink.h b/extern/jsoncpp/include/json/autolink.h
deleted file mode 100644
index 6fcc8afac57..00000000000
--- a/extern/jsoncpp/include/json/autolink.h
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_AUTOLINK_H_INCLUDED
-#define JSON_AUTOLINK_H_INCLUDED
-
-#include "config.h"
-
-#ifdef JSON_IN_CPPTL
-#include <cpptl/cpptl_autolink.h>
-#endif
-
-#if !defined(JSON_NO_AUTOLINK) && !defined(JSON_DLL_BUILD) &&                  \
-    !defined(JSON_IN_CPPTL)
-#define CPPTL_AUTOLINK_NAME "json"
-#undef CPPTL_AUTOLINK_DLL
-#ifdef JSON_DLL
-#define CPPTL_AUTOLINK_DLL
-#endif
-#include "autolink.h"
-#endif
-
-#endif // JSON_AUTOLINK_H_INCLUDED
diff --git a/extern/jsoncpp/include/json/config.h b/extern/jsoncpp/include/json/config.h
deleted file mode 100644
index 6e3f3ac647e..00000000000
--- a/extern/jsoncpp/include/json/config.h
+++ /dev/null
@@ -1,184 +0,0 @@
-// Copyright 2007-2010 Baptiste Lepilleur
-// Distributed under MIT license, or public domain if desired and
-// recognized in your jurisdiction.
-// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
-
-#ifndef JSON_CONFIG_H_INCLUDED
-#define JSON_CONFIG_H_INCLUDED
-#include <stddef.h>
-#include <string> //typedef String
-#include <stdint.h> //typedef int64_t, uint64_t
-
-/// If defined, indicates that json library is embedded in CppTL library.
-//# define JSON_IN_CPPTL 1
-
-/// If defined, indicates that json may leverage CppTL library
-//#  define JSON_USE_CPPTL 1
-/// If defined, indicates that cpptl vector based map should be used instead of
-/// std::map
-/// as Value container.
-//#  define JSON_USE_CPPTL_SMALLMAP 1
-
-// If non-zero, the library uses exceptions to report bad input instead of C
-// assertion macros. The default is to use exceptions.
-#ifndef JSON_USE_EXCEPTION
-#define JSON_USE_EXCEPTION 1
-#endif
-
-/// If defined, indicates that the source file is amalgated
-/// to prevent private header inclusion.
-/// Remarks: it is automatically defined in the generated amalgated header.
-// #define JSON_IS_AMALGAMATION
-
-#ifdef JSON_IN_CPPTL
-#include <cpptl/config.h>
-#ifndef JSON_USE_CPPTL
-#define JSON_USE_CPPTL 1
-#endif
-#endif
-
-#ifdef JSON_IN_CPPTL
-#define JSON_API CPPTL_API
-#elif defined(JSON_DLL_BUILD)
-#if defin

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list