Move all external code to external

This commit is contained in:
Guillaume Meunier
2022-11-17 08:28:59 +01:00
parent f431543b47
commit 48ef782b13
19 changed files with 591 additions and 1306 deletions
+12 -13
View File
@@ -58,7 +58,7 @@ if(ANDROID)
target_link_options(wivrn PRIVATE -Wl,--undefined=ANativeActivity_onCreate)
file(GLOB PLATFORM_SOURCE CONFIGURE_DEPENDS
"src/decoder/android/*.cpp")
"decoder/android/*.cpp")
target_sources(wivrn PRIVATE ${PLATFORM_SOURCE})
else()
add_executable(wivrn)
@@ -69,7 +69,7 @@ else()
file(GLOB PLATFORM_SOURCE CONFIGURE_DEPENDS
"src/decoder/ffmpeg/*.cpp")
"decoder/ffmpeg/*.cpp")
target_sources(wivrn PRIVATE ${PLATFORM_SOURCE})
endif()
@@ -78,20 +78,19 @@ target_compile_definitions(wivrn PRIVATE "XR_USE_TIMESPEC=1")
set_target_properties(wivrn PROPERTIES CXX_VISIBILITY_PRESET hidden)
file(GLOB LOCAL_SOURCE CONFIGURE_DEPENDS
"src/*.cpp"
"src/decoder/*.cpp"
"src/external/*.c"
"src/scenes/*.cpp"
"src/utils/*.cpp"
"src/vk/*.cpp"
"src/xr/*.cpp"
"src/render/*.cpp")
"*.cpp"
"decoder/*.cpp"
"scenes/*.cpp"
"utils/*.cpp"
"vk/*.cpp"
"xr/*.cpp"
"render/*.cpp")
file(GLOB_RECURSE VULKAN_SHADERS CONFIGURE_DEPENDS "src/*.glsl")
file(GLOB_RECURSE VULKAN_SHADERS CONFIGURE_DEPENDS "*.glsl")
target_sources(wivrn PRIVATE ${LOCAL_SOURCE} ${VULKAN_SHADERS})
compile_glsl(wivrn ${VULKAN_SHADERS})
target_link_libraries(wivrn Vulkan::Vulkan spdlog::spdlog glm::glm tinygltf FreetypeHarfbuzz)
target_link_libraries(wivrn Vulkan::Vulkan spdlog::spdlog glm::glm tinygltf FreetypeHarfbuzz reed-solomon)
target_compile_definitions(wivrn PRIVATE -DXR_USE_GRAPHICS_API_VULKAN)
target_compile_options(wivrn PRIVATE -fdiagnostics-color -Wall -Wextra -pedantic) # -Werror
@@ -100,7 +99,7 @@ target_compile_options(wivrn PRIVATE -Wno-missing-field-initializers -Wno-unused
$<$<COMPILE_LANG_AND_ID:CXX,Clang>:-Wno-deprecated-volatile>
)
target_include_directories(wivrn PRIVATE src)
target_include_directories(wivrn PRIVATE .)
target_link_libraries(wivrn wivrn-common)
+1 -1
View File
@@ -18,7 +18,7 @@
*/
#include "application.h"
#include "external/magic_enum.hpp"
#include "magic_enum.hpp"
#include "scene.h"
#include "spdlog/common.h"
#include "spdlog/spdlog.h"
+1 -1
View File
@@ -36,7 +36,7 @@
#include <vulkan/vulkan_android.h>
#include <vulkan/vulkan_core.h>
#include "external/magic_enum.hpp"
#include "magic_enum.hpp"
DEUGLIFY(AMediaFormat)
+1 -1
View File
@@ -19,7 +19,7 @@
#include "shard_accumulator.h"
#include "application.h"
#include "external/rs.h"
#include "rs.h"
#include "scenes/stream.h"
#include "spdlog/spdlog.h"
#include "utils/typename.h"
+1 -1
View File
@@ -23,7 +23,7 @@
#include "application.h"
#include "decoder/shard_accumulator.h"
#include "external/magic_enum.hpp"
#include "magic_enum.hpp"
#include "glm/fwd.hpp"
#include "spdlog/spdlog.h"
#include "utils/check.h"
-7
View File
@@ -24,13 +24,6 @@
#include <vulkan/vulkan.h>
#include <openxr/openxr.h>
#if __has_include(<vulkan/vk_enum_string_helper.h>)
#include <vulkan/vk_enum_string_helper.h>
#else
#include "external/magic_enum.hpp"
#define string_VkResult(x) std::string(magic_enum::enum_name((VkResult)(x)))
#endif
namespace xr
{
const std::error_category & error_category();
+2 -5
View File
@@ -19,7 +19,7 @@
#pragma once
#include "external/magic_enum.hpp"
#include "magic_enum.hpp"
#include "utils/check.h"
#include "vk/buffer.h"
#include "vk/buffer_view.h"
@@ -32,11 +32,8 @@
#include <string>
#include <vulkan/vulkan.h>
#if __has_include(<vulkan/vk_enum_string_helper.h>)
#include <vulkan/vk_enum_string_helper.h>
#else
#define string_VkFormat(x) std::string(magic_enum::enum_name((VkFormat)(x)))
#endif
#define string_VkResult(x) std::string(magic_enum::enum_name((VkResult)(x)))
template <>
struct magic_enum::customize::enum_range<VkFormat>
+1 -1
View File
@@ -1,5 +1,5 @@
#include "wivrn_discover.h"
#include "external/mdns.h"
#include "mdns.h"
#include <arpa/inet.h>
#include <ifaddrs.h>
#include <net/if.h>