[Bf-blender-cvs] [e70894c3600] soc-2019-openxr: Fix compiling with bundled OpenXR SDK sources

Julian Eisel noreply at git.blender.org
Thu May 30 16:22:30 CEST 2019


Commit: e70894c3600959243d698727461f990b72c6561c
Author: Julian Eisel
Date:   Thu May 30 16:19:24 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rBe70894c3600959243d698727461f990b72c6561c

Fix compiling with bundled OpenXR SDK sources

Also remove unused include.

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

M	extern/openxr/CMakeLists.txt
M	release/scripts/addons
M	release/scripts/addons_contrib
M	source/blender/windowmanager/CMakeLists.txt
M	source/blender/windowmanager/intern/wm_init_exit.c

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

diff --git a/extern/openxr/CMakeLists.txt b/extern/openxr/CMakeLists.txt
index 2678928d2ae..50ba3d52574 100644
--- a/extern/openxr/CMakeLists.txt
+++ b/extern/openxr/CMakeLists.txt
@@ -32,12 +32,14 @@ CHECK_FUNCTION_EXISTS(secure_getenv HAVE_SECURE_GETENV)
 CHECK_FUNCTION_EXISTS(__secure_getenv HAVE___SECURE_GETENV)
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/common_cmake_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/common_cmake_config.h)
 
+set(OPENXR_SDK_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/include CACHE INTERNAL "")
+
 add_custom_target(
   generate_openxr_header
   DEPENDS
-    include/openxr/openxr_platform_defines.h
-    include/openxr/openxr.h
-    include/openxr/openxr_platform.h
+    ${OPENXR_SDK_INCLUDES}/openxr/openxr_platform_defines.h
+    ${OPENXR_SDK_INCLUDES}/openxr/openxr.h
+    ${OPENXR_SDK_INCLUDES}/openxr/openxr_platform.h
 )
 
 add_custom_target(
diff --git a/release/scripts/addons b/release/scripts/addons
index 8e6f485cf5b..ed3545322bb 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 8e6f485cf5b160c425d7da7c743879b20f3d6a96
+Subproject commit ed3545322bb94004cca9f56b8f8a6e1ab8ce54d6
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 7077ff07384..0409b81f454 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 7077ff07384491d1f7630484995557f1c7302dae
+Subproject commit 0409b81f45445c2934ad223e430ca7d8970ae5f0
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index 559b2888e7c..b8a6ce98759 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -181,21 +181,18 @@ if(WITH_OPENXR)
   list(APPEND INC_SYS
     ${OPENXR_SDK_INCLUDES}
   )
-
   add_definitions(-DWITH_OPENXR)
 endif()
 
 blender_add_lib_nolist(bf_windowmanager "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
 
-if(WITH_OPENXR)
-  if(OPENXR_USE_BUNDLED_SRC)
-    if(WIN32)
-        set(OPENXR_LOADER_NAME openxr_loader-0_90)
-    else()
-        set(OPENXR_LOADER_NAME openxr_loader)
-    endif()
-
-    add_dependencies(bf_windowmanager generate_openxr_header)
-    target_link_libraries(bf_windowmanager ${OPENXR_LOADER_NAME})
+if(WITH_OPENXR AND OPENXR_USE_BUNDLED_SRC)
+  if(WIN32)
+    set(OPENXR_LOADER_NAME openxr_loader-0_90)
+  else()
+    set(OPENXR_LOADER_NAME openxr_loader)
   endif()
+
+  add_dependencies(bf_windowmanager generate_openxr_header)
+  target_link_libraries(bf_windowmanager ${OPENXR_LOADER_NAME})
 endif()
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index f38aef98c4f..7ac811edb01 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -124,10 +124,6 @@
 
 #include "DEG_depsgraph.h"
 
-#ifdef WITH_OPENXR
-#  include "openxr/openxr.h"
-#endif
-
 #include "wm.h"
 
 #include "DRW_engine.h"



More information about the Bf-blender-cvs mailing list