From 3d6c0f71f7de8a424426f2e72577041db67a5bf5 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sun, 3 Mar 2019 13:19:11 +1100 Subject: [PATCH] build: avoid linking to cruft-vk-loader in `hello` test --- CMakeLists.txt | 20 ++++++++++---------- tools/hello.cpp | 7 ------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 45b9e9d..b8dbfa6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,13 +153,13 @@ list (APPEND 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 - PUBLIC +PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}" "${GENERATED_PREFIX}" "${CMAKE_CURRENT_SOURCE_DIR}/specs/include/vulkan" - ) +) ############################################################################### @@ -193,16 +193,16 @@ endforeach () ############################################################################### foreach (t info hello) add_executable (vk_${t} "tools/${t}.cpp") - set_target_properties(vk_${t} PROPERTIES - OUTPUT_NAME - ${t}) - set_target_properties(vk_${t} PROPERTIES - RUNTIME_OUTPUT_DIRECTORY - "${CMAKE_CURRENT_BINARY_DIR}/tools") + set_target_properties(vk_${t} PROPERTIES + OUTPUT_NAME + ${t}) + set_target_properties(vk_${t} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY + "${CMAKE_CURRENT_BINARY_DIR}/tools") endforeach () 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) ##----------------------------------------------------------------------------- diff --git a/tools/hello.cpp b/tools/hello.cpp index cec46ae..76fbdd5 100644 --- a/tools/hello.cpp +++ b/tools/hello.cpp @@ -293,16 +293,9 @@ public: /////////////////////////////////////////////////////////////////////////////// -#include -#include - int 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"); glfw::instance glfw_instance;