Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions ports/moltenvk/added_configure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
diff --git a/configure b/configure
new file mode 100644
index 000000000..b87cb74
--- /dev/null
+++ b/configure
@@ -0,0 +1 @@
+# This file needs to exist for vcpkg_configure_make to work
\ No newline at end of file
57 changes: 57 additions & 0 deletions ports/moltenvk/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
vcpkg_fail_port_install(ON_TARGET "WINDOWS" "LINUX" "UWP")

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO KhronosGroup/MoltenVK
REF ce85a96d8041b208e6f32898912b217957019b5a
SHA512 fa77a807a6e17fa7359b13546d46e5c5ebb4b7180df0a6fe378ff407c71c40670417ce135195db452df0d2fd1eaa51e39dda6743a1bbf19a6a68417d5e18e360
HEAD_REF master
PATCHES
added_configure.patch
)

# TODO: The dependencies are manually pulled by this script. This step should be ommited and dependencies integrated by vcpkg.
vcpkg_execute_required_process(
COMMAND ./fetchDependencies --macos
WORKING_DIRECTORY ${SOURCE_PATH}
)
Comment thread
JackBoosY marked this conversation as resolved.
Outdated

vcpkg_configure_make(
SOURCE_PATH ${SOURCE_PATH}
#SKIP_CONFIGURE this doesn't work. We therefore patch in an empty configure file
COPY_SOURCE
PREFER_NINJA
)

# TODO: This actually builds the release build two times. We need to actually build a debug verion
# TODO: Currently only macos target is built. ios and tv os should be exported as features
vcpkg_build_make(BUILD_TARGET macos)
Comment thread
JackBoosY marked this conversation as resolved.
Outdated


# copy copyright
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/moltenvk RENAME copyright)

# copy MoltenVK include
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Package/Latest/MoltenVK/include DESTINATION ${CURRENT_PACKAGES_DIR})
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/vulkan)

# copy MoltenVKShaderConverter include
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Package/Latest/MoltenVKShaderConverter/include DESTINATION ${CURRENT_PACKAGES_DIR})

# copy tools
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Package/Latest/MoltenVKShaderConverter/Tools/MoltenVKShaderConverter DESTINATION ${CURRENT_PACKAGES_DIR}/tools/moltenvk)


if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
Comment thread
Haeri marked this conversation as resolved.
Outdated
# copy release dynamic
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Package/Latest/MoltenVK/dylib/macOS/libMoltenVK.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/bin)
# copy debug dynamic
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Package/Latest/MoltenVK/dylib/macOS/libMoltenVK.dylib DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin)
endif()

# copy release static
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Package/Latest/MoltenVK/MoltenVK.xcframework/macos-x86_64/libMoltenVK.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel/Package/Latest/MoltenVKShaderConverter/MoltenVKShaderConverter.xcframework/macos-x86_64/libMoltenVKShaderConverter.a DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
# copy debug static
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Package/Latest/MoltenVK/MoltenVK.xcframework/macos-x86_64/libMoltenVK.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
file(INSTALL ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg/Package/Latest/MoltenVKShaderConverter/MoltenVKShaderConverter.xcframework/macos-x86_64/libMoltenVKShaderConverter.a DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
Comment thread
Haeri marked this conversation as resolved.
Outdated
10 changes: 10 additions & 0 deletions ports/moltenvk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "moltenvk",
"version-string": "1.1.1",
"description": "MoltenVK is a Vulkan Portability implementation. It layers a subset of the high-performance, industry-standard Vulkan graphics and compute API over Apple's Metal graphics framework, enabling Vulkan applications to run on iOS and macOS.",
"homepage": "https://github.com/KhronosGroup/MoltenVK",
"supports": "osx",
"dependencies": [
"vulkan-headers"
]
}
7 changes: 7 additions & 0 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,13 @@ mmx:arm-uwp=skip
mmx:x64-uwp=skip
mmx:arm64-windows=skip
# Flaky strange linker error
moltenvk:x86-windows=fail
moltenvk:x64-windows=fail
moltenvk:x64-windows-static=fail
moltenvk:x64-uwp=fail
moltenvk:arm-uwp=fail
moltenvk:arm64-windows=fail
moltenvk:x64-linux=fail
Comment thread
JackBoosY marked this conversation as resolved.
Outdated
mongo-c-driver:x64-osx=skip
mongoose:arm-uwp=fail
mongoose:x64-uwp=fail
Expand Down