Skip to content

Commit

Permalink
finish moltenvk conan file
Browse files Browse the repository at this point in the history
  • Loading branch information
Nisal Dissanayake committed Jun 9, 2024
1 parent e9ee728 commit 1a7efc8
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 41 deletions.
15 changes: 0 additions & 15 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -219,21 +219,6 @@
"env": {
"DYLD_LIBRARY_PATH" : "${workspaceFolder}/build/lib",
},
},
{
"name": "(lldb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/build/bin/App",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/build/bin",
"environment": [{
"name": "DYLD_LIBRARY_PATH",
"value": "${workspaceFolder}/build/lib"
}],
"externalConsole": false,
"MIMode": "lldb",
}

]
Expand Down
40 changes: 20 additions & 20 deletions Examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
add_subdirectory(Common)
add_subdirectory(1.FirstTriangle)
add_subdirectory(2.VertexBuffers)
add_subdirectory(3.VertexAttributes)
add_subdirectory(4.IndexBuffers)
add_subdirectory(5.UniformBuffers)
add_subdirectory(6.DynamicUniforms)
add_subdirectory(7.First3DShape)
add_subdirectory(8.TransformationMatrices)
add_subdirectory(9.BasicShading)
add_subdirectory(10.FirstTexture)
add_subdirectory(11.TextureSampler)
add_subdirectory(12.TextureLoader)
add_subdirectory(13.CameraControls)
add_subdirectory(14.Lighting)
add_subdirectory(15.NormalMapping)
add_subdirectory(16.BasicCompute)
add_subdirectory(17.RayMarching)
add_subdirectory(18.Fluid2D)
add_subdirectory(19.Fluid3D)
# add_subdirectory(Common)
# add_subdirectory(1.FirstTriangle)
# add_subdirectory(2.VertexBuffers)
# add_subdirectory(3.VertexAttributes)
# add_subdirectory(4.IndexBuffers)
# add_subdirectory(5.UniformBuffers)
# add_subdirectory(6.DynamicUniforms)
# add_subdirectory(7.First3DShape)
# add_subdirectory(8.TransformationMatrices)
# add_subdirectory(9.BasicShading)
# add_subdirectory(10.FirstTexture)
# add_subdirectory(11.TextureSampler)
# add_subdirectory(12.TextureLoader)
# add_subdirectory(13.CameraControls)
# add_subdirectory(14.Lighting)
# add_subdirectory(15.NormalMapping)
# add_subdirectory(16.BasicCompute)
# add_subdirectory(17.RayMarching)
# add_subdirectory(18.Fluid2D)
# add_subdirectory(19.Fluid3D)
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def requirements(self):
if self.options.rendering_backend == "OpenGL":
self.requires("glad/0.1.33")
elif self.options.rendering_backend == "Vulkan":
self.requires("moltenvk/1.2.2")
self.requires("moltenvk/1.2.9")
elif self.options.rendering_backend == "WebGPU":
self.requires("WebGPU/latest@nisaldilshan/testing")
elif self.settings.os == 'Linux':
Expand Down
25 changes: 20 additions & 5 deletions vendor/moltenvk/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ class MoltenVKConan(ConanFile):
url = 'https://github.com/KhronosGroup/MoltenVK'
topics = ('apple', 'metal', 'moltenvk', 'vulkan')
settings = 'os', 'compiler', 'build_type', 'arch'
options = {
'shared': [True, False]
}
default_options = {
'shared': False
}

def requirements(self):
pass
Expand Down Expand Up @@ -37,11 +43,20 @@ def package_id(self):
pass

def package(self):
self.copy(pattern="_deps/dawn-build/gen/include/dawn/webgpu.h", dst="include/webgpu", keep_path=False)
self.copy(pattern="include/webgpu/webgpu.hpp", dst="include/webgpu", keep_path=False)
self.copy(pattern="*libwebgpu_dawn.a", dst="lib", keep_path=False)
self.copy(pattern="*libwebgpu_dawn.dylib", dst="lib", keep_path=False)
self.copy(pattern="MoltenVK/include/MoltenVK/*", dst="include/MoltenVK/", keep_path=False)
self.copy(pattern="MoltenVK/include/vk_video/*", dst="include/vk_video/", keep_path=False)
self.copy(pattern="MoltenVK/include/vulkan/*", dst="include/vulkan/", keep_path=False)

if self.options.shared:
self.copy(pattern="MoltenVK/dynamic/dylib/macOS/*", dst="lib/", keep_path=False)
else:
self.copy(pattern="MoltenVK/static/MoltenVK.xcframework/*", dst="lib/", keep_path=False)

def package_info(self):
pass
self.cpp_info.libs = ["MoltenVK"]
self.cpp_info.frameworks = ["Metal", "Foundation", "CoreFoundation", "QuartzCore", "IOSurface", "CoreGraphics"]
if self.settings.os == "Macos":
self.cpp_info.frameworks.extend(["AppKit", "IOKit"])
elif self.settings.os in ["iOS", "tvOS"]:
self.cpp_info.frameworks.append("UIKit")

0 comments on commit 1a7efc8

Please sign in to comment.