build: rationalise generated header include paths

This commit is contained in:
Danny Robson 2019-06-20 11:38:55 +10:00
parent 27d65f8aed
commit 2ab194cdc0
6 changed files with 21 additions and 19 deletions

View File

@ -14,7 +14,8 @@ endif ()
############################################################################### ###############################################################################
set (GENERATED_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/cruft/vk/") set (GENERATED_BASE "${CMAKE_CURRENT_BINARY_DIR}/prefix")
set (GENERATED_PREFIX "${GENERATED_BASE}/cruft/vk/")
file (MAKE_DIRECTORY "${GENERATED_PREFIX}/load") file (MAKE_DIRECTORY "${GENERATED_PREFIX}/load")
file (MAKE_DIRECTORY "${GENERATED_PREFIX}/tools") file (MAKE_DIRECTORY "${GENERATED_PREFIX}/tools")
@ -89,7 +90,7 @@ foreach (lib vulkan cruft-vk-load)
target_include_directories (${lib} target_include_directories (${lib}
PUBLIC PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}" "${GENERATED_PREFIX}"
"${CMAKE_CURRENT_SOURCE_DIR}/specs/include/vulkan" "${CMAKE_CURRENT_SOURCE_DIR}/specs/include/vulkan"
) )

View File

@ -7,8 +7,8 @@
*/ */
#include <cruft/vk/load/vtable.hpp> #include "load/vtable.hpp"
#include <cruft/vk/load/vendor.hpp> #include "load/vendor.hpp"
#include <vector> #include <vector>

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include <cruft/vk/vk.hpp> #include "vk.hpp"
#include <cruft/vk/load/vtable.hpp> #include "load/vtable.hpp"
#include <cruft/util/library.hpp> #include <cruft/util/library.hpp>
#include <cruft/util/std.hpp> #include <cruft/util/std.hpp>

View File

@ -1 +1 @@
#include <cruft/vk/load/vtable.hpp> #include "load/vtable.hpp"

View File

@ -9,12 +9,12 @@
#include <cruft/util/iterator/infix.hpp> #include <cruft/util/iterator/infix.hpp>
#include <cruft/vk/load/ostream.hpp> #include "load/ostream.hpp"
#include <cruft/vk/load/vtable.hpp> #include "load/vtable.hpp"
#include <cruft/vk/instance.hpp> #include "instance.hpp"
#include <cruft/vk/physical_device.hpp> #include "physical_device.hpp"
#include <cruft/vk/ostream.hpp> #include "ostream.hpp"
#include <iostream> #include <iostream>

View File

@ -802,7 +802,7 @@ def write_load(dst: TextIO, q: List[Type], reg: Registry):
dst.write(f""" dst.write(f"""
#pragma once #pragma once
#include <cruft/vk/vk.hpp> #include "vk.hpp"
#include <cruft/util/preprocessor.hpp> #include <cruft/util/preprocessor.hpp>
@ -845,9 +845,9 @@ def write_load(dst: TextIO, q: List[Type], reg: Registry):
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
def write_dispatch(dst: TextIO, q: List[Type], reg: Registry): def write_dispatch(dst: TextIO, q: List[Type], reg: Registry):
dst.write(""" dst.write("""
#include <cruft/vk/vk.hpp> #include "vk.hpp"
#include <cruft/vk/load/vtable.hpp> #include "load/vtable.hpp"
#include <cruft/vk/load/dispatch.hpp> #include "load/dispatch.hpp"
#include <cruft/util/debug/panic.hpp> #include <cruft/util/debug/panic.hpp>
@ -993,9 +993,10 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry):
def write_trace(dst: TextIO, q: List[Type], reg: Registry): def write_trace(dst: TextIO, q: List[Type], reg: Registry):
dst.write(""" dst.write("""
#include <cruft/vk/vk.hpp> #include "vk.hpp"
#include <cruft/vk/load/vtable.hpp> #include "load/vtable.hpp"
#include <cruft/vk/ostream.hpp> #include "ostream.hpp"
#include <iostream> #include <iostream>
#include <dlfcn.h> #include <dlfcn.h>
#include <cstring> #include <cstring>