diff --git a/rendering_api/metal/CMakeLists.txt b/rendering_api/metal/CMakeLists.txt index a41672c..dd0d8bd 100644 --- a/rendering_api/metal/CMakeLists.txt +++ b/rendering_api/metal/CMakeLists.txt @@ -21,10 +21,15 @@ add_compile_definitions(GN_REVEAL_IMPL) add_subdirectory(depends/metal-cpp) add_library(glfw SHARED IMPORTED) -set_target_properties(glfw PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/build/depends/glfw/glfw-3.4/src/libglfw.dylib) +set_target_properties(glfw PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/build/depends/glfw/glfw-3.4/src/libglfw.3.4.dylib) target_link_libraries(GryphnMetalImpl METAL_CPP glfw spirv-cross-core spirv-cross-msl spirv-cross-cpp) +target_link_libraries(GryphnMetalImpl + "-framework IOKit" + "-framework CoreFoundation" +) + file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/gryphn/rendering_apis) add_custom_command(TARGET GryphnMetalImpl POST_BUILD COMMAND mv libGryphnMetalImpl.dylib ../../rendering_apis/GryphnMetalImpl.dylib diff --git a/rendering_api/metal/src/core/presentation_queue/metal_presentation_queue.cpp b/rendering_api/metal/src/core/presentation_queue/metal_presentation_queue.cpp index aeeaf4a..3993442 100644 --- a/rendering_api/metal/src/core/presentation_queue/metal_presentation_queue.cpp +++ b/rendering_api/metal/src/core/presentation_queue/metal_presentation_queue.cpp @@ -100,9 +100,8 @@ GN_EXPORT gnReturnCode gnCreatePresentationQueueFn(gnPresentationQueue* presenta return GN_SUCCESS; } GN_EXPORT void gnDestroyPresentationQueueFn(gnPresentationQueue& queue) { - /*for (int i = 0; i < gnListLength(queue.images); i++) { + for (int i = 0; i < gnListLength(queue.images); i++) { gnDestroyTexture(queue.images[i]); } - queue.images = gnCreateList();*/ - std::cout << "gnDestroyPresentationQueueFn needs fixin\n"; + queue.images = gnCreateList(); } diff --git a/rendering_api/vulkan/CMakeLists.txt b/rendering_api/vulkan/CMakeLists.txt index 24dd933..3101bcf 100644 --- a/rendering_api/vulkan/CMakeLists.txt +++ b/rendering_api/vulkan/CMakeLists.txt @@ -17,12 +17,19 @@ target_include_directories(GryphnVulkanImpl PUBLIC add_compile_definitions(GN_REVEAL_IMPL) add_library(glfw SHARED IMPORTED) -set_target_properties(glfw PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/build/depends/glfw/glfw-3.4/src/libglfw.dylib) +set_target_properties(glfw PROPERTIES IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/build/depends/glfw/glfw-3.4/src/libglfw.3.4.dylib) add_library(libvulkan SHARED IMPORTED) set_target_properties(libvulkan PROPERTIES IMPORTED_LOCATION /Applications/vulkansdk/macOS/lib/libvulkan.dylib) -target_link_libraries(GryphnVulkanImpl glfw libvulkan ) +target_link_libraries(GryphnVulkanImpl glfw libvulkan) + +target_link_libraries(GryphnVulkanImpl + "-framework IOKit" + "-framework CoreFoundation" + "-framework CoreGraphics" + "-framework AppKit" +) file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/gryphn/rendering_apis) add_custom_command(TARGET GryphnVulkanImpl POST_BUILD