diff --git a/CMakeLists.txt b/CMakeLists.txt index 7089093..e20af8b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}/tools") @@ -89,7 +90,7 @@ foreach (lib vulkan cruft-vk-load) target_include_directories (${lib} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" - "${CMAKE_CURRENT_BINARY_DIR}" + "${GENERATED_PREFIX}" "${CMAKE_CURRENT_SOURCE_DIR}/specs/include/vulkan" ) diff --git a/load/init.cpp b/load/init.cpp index 4151d28..8767faf 100644 --- a/load/init.cpp +++ b/load/init.cpp @@ -7,8 +7,8 @@ */ -#include -#include +#include "load/vtable.hpp" +#include "load/vendor.hpp" #include diff --git a/load/vendor.hpp b/load/vendor.hpp index 633633b..c72329f 100644 --- a/load/vendor.hpp +++ b/load/vendor.hpp @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include "vk.hpp" +#include "load/vtable.hpp" #include #include diff --git a/load/vtable.cpp b/load/vtable.cpp index 8d92d42..2dacf82 100644 --- a/load/vtable.cpp +++ b/load/vtable.cpp @@ -1 +1 @@ -#include +#include "load/vtable.hpp" diff --git a/tools/info.cpp b/tools/info.cpp index 9e5749f..6e63ccd 100644 --- a/tools/info.cpp +++ b/tools/info.cpp @@ -9,12 +9,12 @@ #include -#include -#include +#include "load/ostream.hpp" +#include "load/vtable.hpp" -#include -#include -#include +#include "instance.hpp" +#include "physical_device.hpp" +#include "ostream.hpp" #include diff --git a/tools/spec.py b/tools/spec.py index 19b49ca..1e5902c 100644 --- a/tools/spec.py +++ b/tools/spec.py @@ -802,7 +802,7 @@ def write_load(dst: TextIO, q: List[Type], reg: Registry): dst.write(f""" #pragma once - #include + #include "vk.hpp" #include @@ -845,9 +845,9 @@ def write_load(dst: TextIO, q: List[Type], reg: Registry): # ----------------------------------------------------------------------------- def write_dispatch(dst: TextIO, q: List[Type], reg: Registry): dst.write(""" - #include - #include - #include + #include "vk.hpp" + #include "load/vtable.hpp" + #include "load/dispatch.hpp" #include @@ -993,9 +993,10 @@ def write_dispatch(dst: TextIO, q: List[Type], reg: Registry): def write_trace(dst: TextIO, q: List[Type], reg: Registry): dst.write(""" - #include - #include - #include + #include "vk.hpp" + #include "load/vtable.hpp" + #include "ostream.hpp" + #include #include #include