build: avoid linking to cruft-vk-loader in hello
test
This commit is contained in:
parent
2828fd24f3
commit
3d6c0f71f7
@ -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"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -193,16 +193,16 @@ endforeach ()
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
foreach (t info hello)
|
foreach (t info hello)
|
||||||
add_executable (vk_${t} "tools/${t}.cpp")
|
add_executable (vk_${t} "tools/${t}.cpp")
|
||||||
set_target_properties(vk_${t} PROPERTIES
|
set_target_properties(vk_${t} PROPERTIES
|
||||||
OUTPUT_NAME
|
OUTPUT_NAME
|
||||||
${t})
|
${t})
|
||||||
set_target_properties(vk_${t} PROPERTIES
|
set_target_properties(vk_${t} PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY
|
RUNTIME_OUTPUT_DIRECTORY
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/tools")
|
"${CMAKE_CURRENT_BINARY_DIR}/tools")
|
||||||
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)
|
||||||
|
|
||||||
|
|
||||||
##-----------------------------------------------------------------------------
|
##-----------------------------------------------------------------------------
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user