build: avoid linking to cruft-vk-loader in hello test

This commit is contained in:
Danny Robson 2019-03-03 13:19:11 +11:00
parent 2828fd24f3
commit 3d6c0f71f7
2 changed files with 10 additions and 17 deletions

View File

@ -153,13 +153,13 @@ list (APPEND sources
##----------------------------------------------------------------------------- ##-----------------------------------------------------------------------------
add_library (cruft-vk STATIC ${sources}) add_library (cruft-vk STATIC ${sources})
target_link_libraries (cruft-vk cruft-vk-load cruft) target_link_libraries (cruft-vk cruft)
target_include_directories (cruft-vk target_include_directories (cruft-vk
PUBLIC PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
"${GENERATED_PREFIX}" "${GENERATED_PREFIX}"
"${CMAKE_CURRENT_SOURCE_DIR}/specs/include/vulkan" "${CMAKE_CURRENT_SOURCE_DIR}/specs/include/vulkan"
) )
############################################################################### ###############################################################################
@ -202,7 +202,7 @@ foreach (t info hello)
endforeach () endforeach ()
target_link_libraries (vk_info cruft-vk cruft-vk-load) target_link_libraries (vk_info cruft-vk cruft-vk-load)
target_link_libraries (vk_hello cruft-vk glfw) target_link_libraries (vk_hello ${NC_CXX_STDCXXFS} cruft cruft-vk glfw vulkan)
##----------------------------------------------------------------------------- ##-----------------------------------------------------------------------------

View File

@ -293,16 +293,9 @@ public:
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
#include <cruft/vk/load/vtable.hpp>
#include <cruft/vk/load/vendor.hpp>
int int
main (void) main (void)
{ {
cruft::vk::load::vendor v (cruft::vk::load::enumerate ()[0]);
cruft::vk::load::i_table = &v.itable;
cruft::vk::load::v_table = &v.vtable;
LOG_INFO ("intialising glfw"); LOG_INFO ("intialising glfw");
glfw::instance glfw_instance; glfw::instance glfw_instance;