Merge pull request #263169 from K900/vulkan-1.2.268

Vulkan 1.3.268
This commit is contained in:
K900 2023-10-26 03:14:42 +03:00 committed by GitHub
commit edff793e3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 85 additions and 255 deletions

View File

@ -0,0 +1,28 @@
{ lib
, stdenv
, fetchFromGitHub
, cmake
}:
stdenv.mkDerivation rec {
pname = "valijson";
version = "1.0.1";
src = fetchFromGitHub {
owner = "tristanpenman";
repo = "valijson";
rev = "v${version}";
hash = "sha256-COVFBZtuTd1nyI/25feUYCurBwPlQV3qbxSSkn6aLl4=";
};
nativeBuildInputs = [
cmake
];
meta = with lib; {
description = "Header-only C++ library for JSON Schema validation, with support for many popular parsers";
homepage = "https://github.com/tristanpenman/valijson";
license = licenses.bsd2;
platforms = platforms.all;
};
}

View File

@ -9,13 +9,13 @@
}:
stdenv.mkDerivation rec {
pname = "glslang";
version = "12.3.1";
version = "13.1.1";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "glslang";
rev = version;
hash = "sha256-NP5ph598YSPbpzJJUR2r+EkqFmuItxgvOSDgDaN+Swg=";
hash = "sha256-fuzNsVYdnThMzd4tLN/sTbCBXg6qXKLDJRziOKyOBGg=";
};
# These get set at all-packages, keep onto them for child drvs

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "spirv-headers";
version = "1.3.261.0";
version = "1.3.268.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Headers";
rev = "sdk-${version}";
hash = "sha256-P/ZD53Xa4Fk9+N/bW5HhsfA+LjUnCbBsQDHvXesKu5M=";
rev = "vulkan-sdk-${version}";
hash = "sha256-uOnSTih14bUPtrJgp7vVb3/UfdKsF6jFQqjlFeJ81AI=";
};
nativeBuildInputs = [ cmake ];

View File

@ -1,15 +1,15 @@
{ lib, stdenv, fetchFromGitHub, cmake }:
stdenv.mkDerivation rec {
pname = "vulkan-headers";
version = "1.3.261";
version = "1.3.268.0";
nativeBuildInputs = [ cmake ];
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Headers";
rev = "v${version}";
hash = "sha256-zKHew7SGUq1C3XGp/HrCle6KyqB4cziPcTYVqAr814s=";
rev = "vulkan-sdk-${version}";
hash = "sha256-CDjWTXXnUgj9QaLDNuSVy+wf8If5LehwOZ0t0Fuh2Ro=";
};
passthru.updateScript = ./update.sh;

View File

@ -3,7 +3,7 @@
set -euf -o pipefail
V_PACKAGES=(
SDK_PACKAGES=(
"vulkan-headers"
"vulkan-loader"
"vulkan-validation-layers"
@ -11,9 +11,6 @@ V_PACKAGES=(
"vulkan-tools-lunarg"
"vulkan-extension-layer"
"vulkan-utility-libraries"
)
SDK_PACKAGES=(
"spirv-headers"
"spirv-cross"
"spirv-tools"
@ -21,10 +18,6 @@ SDK_PACKAGES=(
nix-update glslang --version-regex '(\d+\.\d+\.\d+)' --commit
for P in "${V_PACKAGES[@]}"; do
nix-update "$P" --version-regex "(?:v)(.*)" --commit
done
for P in "${SDK_PACKAGES[@]}"; do
nix-update "$P" --version-regex "(?:sdk-)(.*)" --commit
nix-update "$P" --version-regex "(?:vulkan-sdk-)(.*)" --commit
done

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation rec {
pname = "vulkan-loader";
version = "1.3.261";
version = "1.3.268.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Loader";
rev = "v${version}";
hash = "sha256-5QCVHfvjE98EnL2Dr7g9fdrJAg+np1Q6hgqcuZCWReQ=";
rev = "vulkan-sdk-${version}";
hash = "sha256-TDn8eVz1fhGfvUiGcxqOk2BN9tuIF5+ssIXtOo3weS0=";
};
patches = [ ./fix-pkgconfig.patch ];

View File

@ -5,8 +5,8 @@ index 153815577..584b15273 100644
@@ -1,7 +1,5 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=${prefix}
-libdir=${exec_prefix}/@CMAKE_INSTALL_REL_LIBDIR_PC@
-includedir=${prefix}/@CMAKE_INSTALL_REL_INCLUDEDIR_PC@
-libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR_PC@
-includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR_PC@
+libdir=@CMAKE_INSTALL_LIBDIR@
+includedir=@CMAKE_INSTALL_INCLUDEDIR@

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "vulkan-utility-libraries";
version = "1.3.261";
version = "1.3.268.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Utility-Libraries";
rev = "v${finalAttrs.version}";
hash = "sha256-szkBKNcxTHMYhhHFWr5WjD91Vf/AyZaGymvlDU9ff7s=";
rev = "vulkan-sdk-${finalAttrs.version}";
hash = "sha256-O1agpzZpXiQZFYx1jPosIhxJovZtfZSLBNFj1LVB1VI=";
};
nativeBuildInputs = [ cmake python3 ];

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "spirv-tools";
version = "1.3.261.0";
version = "1.3.268.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Tools";
rev = "sdk-${version}";
hash = "sha256-K7cv0mMNrXYOlJsxAPwz3rVX5FnsnBNvaU33k9hYnQc=";
rev = "vulkan-sdk-${version}";
hash = "sha256-Bned5Pa6zCFByfNvqD0M5t3l4uAJYkDlpe6wu8e7a3U=";
};
# The cmake options are sufficient for turning on static building, but not

View File

@ -23,18 +23,13 @@ let
in
stdenv.mkDerivation rec {
pname = "vulkan-validation-layers";
version = "1.3.261";
# If we were to use "dev" here instead of headers, the setupHook would be
# placed in that output instead of "out".
outputs = ["out" "headers"];
outputInclude = "headers";
version = "1.3.268.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-ValidationLayers";
rev = "v${version}";
hash = "sha256-4kE3pkyYu6hnbv19fHhON+hI2HU4vLm31tNlp5fhndM=";
rev = "vulkan-sdk-${version}";
hash = "sha256-DwkSUclStYKe54tC1H3jMv1KOSScgqf25tR5ajQZ6os=";
};
nativeBuildInputs = [

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation (finalAttrs: {
pname = "spirv-cross";
version = "1.3.261.0";
version = "1.3.268.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "SPIRV-Cross";
rev = "sdk-${finalAttrs.version}";
hash = "sha256-abVqLovvcKBJhGhSCbyD5mc1DSfvh4TWssGxi52ukQ8=";
rev = "vulkan-sdk-${finalAttrs.version}";
hash = "sha256-UIk5hihUPjXNzEeO2laS4dUef/rEExxXAZjMcftx+3A=";
};
nativeBuildInputs = [ cmake python3 ];

View File

@ -1,19 +1,19 @@
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, writeText, vulkan-headers, jq, libX11, libXrandr, libxcb, wayland }:
{ lib, stdenv, fetchFromGitHub, cmake, pkg-config, writeText, vulkan-headers, vulkan-utility-libraries, jq, libX11, libXrandr, libxcb, wayland }:
stdenv.mkDerivation rec {
pname = "vulkan-extension-layer";
version = "1.3.261";
version = "1.3.268.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-ExtensionLayer";
rev = "v${version}";
hash = "sha256-MeW7mmbjgqEvXEnAYzTNu4omC4fqq1fplIVjDpV2LcA=";
rev = "vulkan-sdk-${version}";
hash = "sha256-rSKPTeTDOz6IeJGRt9aIu1VH8VfVzXNYZfjdiSXEJxg=";
};
nativeBuildInputs = [ cmake pkg-config jq ];
buildInputs = [ vulkan-headers libX11 libXrandr libxcb wayland ];
buildInputs = [ vulkan-headers vulkan-utility-libraries libX11 libXrandr libxcb wayland ];
# Help vulkan-loader find the validation layers
setupHook = writeText "setup-hook" ''

View File

@ -16,23 +16,22 @@
, which
, xcbutilkeysyms
, xcbutilwm
, valijson
, vulkan-headers
, vulkan-loader
, symlinkJoin
, vulkan-validation-layers
, vulkan-utility-libraries
, writeText
}:
stdenv.mkDerivation rec {
pname = "vulkan-tools-lunarg";
version = "1.3.261";
version = "1.3.268.0";
src = fetchFromGitHub {
owner = "LunarG";
repo = "VulkanTools";
rev = "v${version}";
hash = "sha256-Kem3nWVaMeDEsidKYMsWr9Bu0yBgjjennDB0sKBDogA=";
fetchSubmodules = true;
rev = "vulkan-sdk-${version}";
hash = "sha256-2ZUD+RBsl35QV3250JOPCIoJb4sJcBsiRE4SZaS6ROs=";
};
nativeBuildInputs = [ cmake python3 jq which pkg-config ];
@ -45,6 +44,10 @@ stdenv.mkDerivation rec {
libXrandr
libffi
libxcb
valijson
vulkan-headers
vulkan-loader
vulkan-utility-libraries
wayland
xcbutilkeysyms
xcbutilwm
@ -52,27 +55,10 @@ stdenv.mkDerivation rec {
cmakeFlags = [
"-DVULKAN_HEADERS_INSTALL_DIR=${vulkan-headers}"
"-DVULKAN_LOADER_INSTALL_DIR=${vulkan-loader}"
"-DVULKAN_VALIDATIONLAYERS_INSTALL_DIR=${
symlinkJoin {
name = "vulkan-validation-layers-merged";
paths = [ vulkan-validation-layers.headers vulkan-validation-layers ];
}
}"
# Hide dev warnings that are useless for packaging
"-Wno-dev"
];
preConfigure = ''
# We need to run this update script which generates some source files,
# Remove the line in it which calls 'git submodule update' though.
# Also patch the scripts in ./scripts
update=update_external_sources.sh
patchShebangs $update
patchShebangs scripts/*
sed -i '/^git /d' $update
./$update
substituteInPlace via/CMakeLists.txt --replace "jsoncpp_static" "jsoncpp"
'';
@ -85,13 +71,6 @@ stdenv.mkDerivation rec {
done
'';
patches = [
./gtest.patch
];
# Same as vulkan-validation-layers
dontPatchELF = true;
# Help vulkan-loader find the validation layers
setupHook = writeText "setup-hook" ''
export XDG_CONFIG_DIRS=@out@/etc''${XDG_CONFIG_DIRS:+:''${XDG_CONFIG_DIRS}}

View File

@ -1,34 +0,0 @@
diff --git a/external/googletest/googlemock/CMakeLists.txt b/external/googletest/googlemock/CMakeLists.txt
index e7df8ec53d..869bfcb716 100644
--- a/external/googletest/googlemock/CMakeLists.txt
+++ b/external/googletest/googlemock/CMakeLists.txt
@@ -111,10 +111,10 @@ endif()
if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
target_include_directories(gmock SYSTEM INTERFACE
"$<BUILD_INTERFACE:${gmock_build_include_dirs}>"
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
+ "$<INSTALL_INTERFACE:${CMAKE_INSTALL_FULL_INCLUDEDIR}>")
target_include_directories(gmock_main SYSTEM INTERFACE
"$<BUILD_INTERFACE:${gmock_build_include_dirs}>"
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
+ "$<INSTALL_INTERFACE:${CMAKE_INSTALL_FULL_INCLUDEDIR}>")
endif()
########################################################################
diff --git a/external/googletest/googletest/CMakeLists.txt b/external/googletest/googletest/CMakeLists.txt
index abdd98b79a..7ae174d566 100644
--- a/external/googletest/googletest/CMakeLists.txt
+++ b/external/googletest/googletest/CMakeLists.txt
@@ -138,10 +138,10 @@ set_target_properties(gtest_main PROPERTIES VERSION ${GOOGLETEST_VERSION})
if (DEFINED CMAKE_VERSION AND NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
target_include_directories(gtest SYSTEM INTERFACE
"$<BUILD_INTERFACE:${gtest_build_include_dirs}>"
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
+ "$<INSTALL_INTERFACE:${CMAKE_INSTALL_FULL_INCLUDEDIR}>")
target_include_directories(gtest_main SYSTEM INTERFACE
"$<BUILD_INTERFACE:${gtest_build_include_dirs}>"
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/${CMAKE_INSTALL_INCLUDEDIR}>")
+ "$<INSTALL_INTERFACE:${CMAKE_INSTALL_FULL_INCLUDEDIR}>")
endif()
target_link_libraries(gtest_main PUBLIC gtest)

View File

@ -22,13 +22,13 @@
stdenv.mkDerivation rec {
pname = "vulkan-tools";
version = "1.3.261";
version = "1.3.268.0";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Tools";
rev = "v${version}";
hash = "sha256-C5FVkI9F/dgIS8qp7VaOn9J2zoNLb1PnmgAemsVO6zM=";
rev = "vulkan-sdk-${version}";
hash = "sha256-IsMxiAR4ak6kC3BNYhtI+JVNkEka4ZceSElxk39THXg=";
};
nativeBuildInputs = [
@ -57,27 +57,19 @@ stdenv.mkDerivation rec {
Cocoa
];
libraryPath = lib.strings.makeLibraryPath [ vulkan-loader ];
patches = [
# Vulkan-Tools expects to find the MoltenVK ICD and `libMoltenVK.dylib` in its source repo.
# Patch it to use the already-built binaries and ICD in nixpkgs.
./use-nix-moltenvk.patch
];
# vkcube.app and vkcubepp.app require `ibtool`, but the version in `xib2nib` is not capable of
# building these apps. Build them using `ibtool` from Xcode, but dont allow any other binaries
# into the sandbox. Note that the CLT are not supported because `ibtool` requires Xcode.
sandboxProfile = lib.optionalString stdenv.isDarwin ''
(allow process-exec
(literal "/usr/bin/ibtool")
(regex "/Xcode.app/Contents/Developer/usr/bin/ibtool")
(regex "/Xcode.app/Contents/Developer/usr/bin/xcodebuild"))
(allow file-read*)
(deny file-read* (subpath "/usr/local") (with no-log))
(allow file-write* (subpath "/private/var/folders"))
postPatch = lib.optionalString stdenv.isDarwin ''
# Modify mac_common.cmake to find the ICD where nixpkgs puts it.
substituteInPlace mac_common.cmake \
--replace MoltenVK/icd/MoltenVK_icd.json MoltenVK_icd.json
# Remove the unconditional check for `ibtool` since the cube demo that needs it wont be built.
sed -e '/#.*Interface Builder/,/^endif()/d' -i mac_common.cmake
# Install `vulkaninfo` to $out/bin even on Darwin.
substituteInPlace vulkaninfo/CMakeLists.txt \
--replace 'install(TARGETS vulkaninfo RUNTIME DESTINATION "vulkaninfo")' 'install(TARGETS vulkaninfo)'
'';
libraryPath = lib.strings.makeLibraryPath [ vulkan-loader ];
dontPatchELF = true;
cmakeFlags = [
@ -91,7 +83,8 @@ stdenv.mkDerivation rec {
"-Wno-dev"
] ++ lib.optionals stdenv.isDarwin [
"-DMOLTENVK_REPO_ROOT=${moltenvk}/share/vulkan/icd.d"
"-DIBTOOL=/usr/bin/ibtool"
# Dont build the cube demo because it requires `ibtool`, which is not available in nixpkgs.
"-DBUILD_CUBE=OFF"
];
meta = with lib; {
@ -102,7 +95,6 @@ stdenv.mkDerivation rec {
use of the Vulkan API.
'';
homepage = "https://github.com/KhronosGroup/Vulkan-Tools";
hydraPlatforms = [ "x86_64-linux" "i686-linux" ];
platforms = platforms.unix;
license = licenses.asl20;
maintainers = [ maintainers.ralith ];

View File

@ -1,123 +0,0 @@
diff --git a/cube/CMakeLists.txt b/cube/CMakeLists.txt
index a2f026e7..327f5dba 100644
--- a/cube/CMakeLists.txt
+++ b/cube/CMakeLists.txt
@@ -257,14 +257,7 @@ else()
endif()
if(APPLE)
- # Keep RPATH so fixup_bundle can use it to find libraries
- set_target_properties(vkcube PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
- install(TARGETS vkcube BUNDLE DESTINATION "cube")
- # Fix up the library references to be self-contained within the bundle.
- install(CODE "
- include(BundleUtilities)
- fixup_bundle(\${CMAKE_INSTALL_PREFIX}/cube/vkcube.app \"\" \"${Vulkan_LIBRARY_DIR}\")
- ")
+ install(TARGETS vkcube BUNDLE DESTINATION "Applications")
else()
install(TARGETS vkcube RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
@@ -302,14 +295,7 @@ else()
endif()
if(APPLE)
- # Keep RPATH so fixup_bundle can use it to find libraries
- set_target_properties(vkcubepp PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE)
- install(TARGETS vkcubepp BUNDLE DESTINATION "cube")
- # Fix up the library references to be self-contained within the bundle.
- install(CODE "
- include(BundleUtilities)
- fixup_bundle(\${CMAKE_INSTALL_PREFIX}/cube/vkcubepp.app \"\" \"${Vulkan_LIBRARY_DIR}\")
- ")
+ install(TARGETS vkcubepp BUNDLE DESTINATION "Applications")
else()
install(TARGETS vkcubepp RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
diff --git a/cube/macOS/cube/cube.cmake b/cube/macOS/cube/cube.cmake
index 9b823f95..0c43a2c9 100644
--- a/cube/macOS/cube/cube.cmake
+++ b/cube/macOS/cube/cube.cmake
@@ -72,12 +72,14 @@ set_source_files_properties("${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json"
# Copy the MoltenVK lib into the bundle.
if(${CMAKE_GENERATOR} MATCHES "^Xcode.*")
add_custom_command(TARGET vkcube POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/vkcube.app/Contents/Frameworks
+ COMMAND ${CMAKE_COMMAND} -E create_symlink "${MOLTENVK_DIR}/lib/libMoltenVK.dylib"
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/vkcube.app/Contents/Frameworks/libMoltenVK.dylib
DEPENDS vulkan)
else()
add_custom_command(TARGET vkcube POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/vkcube.app/Contents/Frameworks
+ COMMAND ${CMAKE_COMMAND} -E create_symlink "${MOLTENVK_DIR}/lib/libMoltenVK.dylib"
${CMAKE_CURRENT_BINARY_DIR}/vkcube.app/Contents/Frameworks/libMoltenVK.dylib
DEPENDS vulkan)
endif()
diff --git a/cube/macOS/cubepp/cubepp.cmake b/cube/macOS/cubepp/cubepp.cmake
index eae4de3c..e528ae26 100644
--- a/cube/macOS/cubepp/cubepp.cmake
+++ b/cube/macOS/cubepp/cubepp.cmake
@@ -74,12 +74,14 @@ set_source_files_properties("${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json"
# Copy the MoltenVK lib into the bundle.
if(${CMAKE_GENERATOR} MATCHES "^Xcode.*")
add_custom_command(TARGET vkcubepp POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/vkcubepp.app/Contents/Frameworks
+ COMMAND ${CMAKE_COMMAND} -E create_symlink "${MOLTENVK_DIR}/lib/libMoltenVK.dylib"
${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/vkcubepp.app/Contents/Frameworks/libMoltenVK.dylib
DEPENDS vulkan)
else()
add_custom_command(TARGET vkcubepp POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy "${MOLTENVK_DIR}/MoltenVK/dylib/macOS/libMoltenVK.dylib"
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/vkcubepp.app/Contents/Frameworks
+ COMMAND ${CMAKE_COMMAND} -E create_symlink "${MOLTENVK_DIR}/lib/libMoltenVK.dylib"
${CMAKE_CURRENT_BINARY_DIR}/vkcubepp.app/Contents/Frameworks/libMoltenVK.dylib
DEPENDS vulkan)
endif()
diff --git a/mac_common.cmake b/mac_common.cmake
index bad3c414..b498906d 100644
--- a/mac_common.cmake
+++ b/mac_common.cmake
@@ -23,9 +23,8 @@ set(MOLTENVK_DIR ${MOLTENVK_REPO_ROOT})
# MoltenVK JSON File
execute_process(COMMAND mkdir -p ${CMAKE_BINARY_DIR}/staging-json)
-execute_process(COMMAND sed -e "/\"library_path\":/s$:[[:space:]]*\"[[:space:]]*[\\.\\/]*$: \"..\\/..\\/..\\/Frameworks\\/$"
- ${MOLTENVK_DIR}/MoltenVK/icd/MoltenVK_icd.json
- OUTPUT_FILE ${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json)
+execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${MOLTENVK_DIR}/MoltenVK_icd.json
+ ${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json)
# ~~~
# Modify the ICD JSON file to adjust the library path.
@@ -36,10 +35,9 @@ execute_process(COMMAND sed -e "/\"library_path\":/s$:[[:space:]]*\"[[:space:]]*
# ~~~
add_custom_target(MoltenVK_icd-staging-json ALL
COMMAND mkdir -p ${CMAKE_BINARY_DIR}/staging-json
- COMMAND sed -e "/\"library_path\":/s$:[[:space:]]*\"[[:space:]]*[\\.\\/]*$: \"..\\/..\\/..\\/Frameworks\\/$"
- ${MOLTENVK_DIR}/MoltenVK/icd/MoltenVK_icd.json > ${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json
- VERBATIM
- DEPENDS "${MOLTENVK_DIR}/MoltenVK/icd/MoltenVK_icd.json")
+ COMMAND ${CMAKE_COMMAND} -E create_symlink ${MOLTENVK_DIR}/MoltenVK_icd.json
+ ${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json
+ DEPENDS "${MOLTENVK_DIR}/MoltenVK_icd.json")
set_source_files_properties(${CMAKE_BINARY_DIR}/staging-json/MoltenVK_icd.json PROPERTIES GENERATED TRUE)
find_library(COCOA NAMES Cocoa)
diff --git a/vulkaninfo/CMakeLists.txt b/vulkaninfo/CMakeLists.txt
index d23dcf89..32aa0ebb 100644
--- a/vulkaninfo/CMakeLists.txt
+++ b/vulkaninfo/CMakeLists.txt
@@ -136,9 +136,5 @@ elseif(APPLE)
add_definitions(-DVK_USE_PLATFORM_MACOS_MVK -DVK_USE_PLATFORM_METAL_EXT)
endif()
-if(APPLE)
- install(TARGETS vulkaninfo RUNTIME DESTINATION "vulkaninfo")
-else()
- install(TARGETS vulkaninfo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
-endif()
+install(TARGETS vulkaninfo RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})