Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[moltenvk] New Port #14819

Closed
wants to merge 8 commits into from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions ports/moltenvk/added_configure.patch
@@ -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
@@ -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}
)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved

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)
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved


# 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")
Haeri marked this conversation as resolved.
Show resolved Hide resolved
# 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)
Haeri marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 10 additions & 0 deletions ports/moltenvk/vcpkg.json
@@ -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
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
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
mongo-c-driver:x64-osx=skip
mongoose:arm-uwp=fail
mongoose:x64-uwp=fail
Expand Down