aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjuan-lunarg <juan@lunarg.com>2023-05-23 16:02:16 -0600
committerJuan Ramos <114601453+juan-lunarg@users.noreply.github.com>2023-05-23 17:11:22 -0600
commitf31c10971f7cca67ecb4eb2b1959ebabfa38470b (patch)
treee54b7e7d26bc66dcfa1feba08fc6578da2ec3e12
parent80b010b1e1b08c1f092fb2bfa337faadf8ea1ba3 (diff)
downloadusermoji-f31c10971f7cca67ecb4eb2b1959ebabfa38470b.tar.xz
icd: Fix WIN32 Mock ICD installation
Mock isn't a typical library. It's a loadable module which should be installed in the bin folder for Windows users. This is consistent with how we treat other modules.
-rw-r--r--.github/workflows/tools.yml12
-rw-r--r--BUILD.md15
-rw-r--r--icd/CMakeLists.txt6
3 files changed, 24 insertions, 9 deletions
diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml
index 6027666b..5da83e50 100644
--- a/.github/workflows/tools.yml
+++ b/.github/workflows/tools.yml
@@ -63,7 +63,7 @@ jobs:
with:
key: ${{ runner.os }}-${{ matrix.config }}-${{ matrix.cc }}-${{matrix.cube_wsi}}
- name: Configure
- run: cmake -S. -B build -DCMAKE_BUILD_TYPE=${{matrix.config}} -DCUBE_WSI_SELECTION=${{matrix.cube_wsi}} -D UPDATE_DEPS=ON -G "Ninja"
+ run: cmake -S. -B build -G "Ninja" -DCMAKE_BUILD_TYPE=${{matrix.config}} -DCUBE_WSI_SELECTION=${{matrix.cube_wsi}} -D UPDATE_DEPS=ON -D INSTALL_ICD=ON
env:
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
@@ -73,6 +73,9 @@ jobs:
- name: Build
run: cmake --build build
+ - name: Install
+ run: cmake --install build/ --prefix build/install
+
- name: Verify generated source files
run: python scripts/generate_source.py --verify external/${{ matrix.config }}/Vulkan-Headers/build/install/share/vulkan/registry
@@ -96,11 +99,14 @@ jobs:
arch: ${{ matrix.arch }}
- name: Configure
- run: cmake -S. -B build -DCMAKE_BUILD_TYPE=${{matrix.config}} -D UPDATE_DEPS=ON -G "Ninja"
+ run: cmake -S. -B build -G "Ninja" -DCMAKE_BUILD_TYPE=${{matrix.config}} -D UPDATE_DEPS=ON -D INSTALL_ICD=ON
- name: Build
run: cmake --build ./build
+ - name: Install
+ run: cmake --install build/ --prefix build/install
+
- name: Verify generated source files
run: python scripts/generate_source.py --verify external/${{matrix.config}}/Vulkan-Headers/build/install/share/vulkan/registry
@@ -123,7 +129,7 @@ jobs:
run: echo "/usr/lib/ccache:/usr/local/opt/ccache/libexec" >> $GITHUB_PATH
- name: Configure
- run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -D UPDATE_DEPS=ON -G "Ninja"
+ run: cmake -S. -B build -G "Ninja" -DCMAKE_BUILD_TYPE=Release -D UPDATE_DEPS=ON -D INSTALL_ICD=ON
env:
MACOSX_DEPLOYMENT_TARGET: 10.15
diff --git a/BUILD.md b/BUILD.md
index 63415e94..017361f8 100644
--- a/BUILD.md
+++ b/BUILD.md
@@ -32,9 +32,18 @@ This repository contains the source code necessary to build the following compon
The `install` target installs the following files under the directory
indicated by *install_dir*:
-- *install_dir*`/bin` : The vulkaninfo, vkcube and vkcubepp executables
-- *install_dir*`/lib` : The mock ICD library and JSON (Windows) (If INSTALL_ICD=ON)
-- *install_dir*`/share/vulkan/icd.d` : mock ICD JSON (Linux/MacOS) (If INSTALL_ICD=ON)
+- *install_dir*`/bin` : The `vulkaninfo`, `vkcube` and `vkcubepp` executables
+
+`MockICD` if `INSTALL_ICD` is configured:
+
+For Unix operating systems:
+
+- *install_dir*`/bin` : The Mock ICD
+- *install_dir*`/share/vulkan/icd.d` : Mock ICD JSON
+
+For WIN32:
+
+- *install_dir*`/bin` : The Mock ICD and JSON
## Repository Set-Up
diff --git a/icd/CMakeLists.txt b/icd/CMakeLists.txt
index 950300de..365b43e3 100644
--- a/icd/CMakeLists.txt
+++ b/icd/CMakeLists.txt
@@ -110,7 +110,7 @@ if(WIN32)
add_library(VkICD_${target} SHARED ${ARGN} VkICD_${target}.def)
target_link_libraries(VkICD_${target} PRIVATE Vulkan::Headers)
if(INSTALL_ICD)
- install(TARGETS VkICD_${target} DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ install(TARGETS VkICD_${target} DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()
endmacro()
elseif(APPLE)
@@ -178,6 +178,6 @@ endif()
# Windows uses the JSON file as-is.
if(WIN32 AND INSTALL_ICD)
foreach(config_file ${ICD_JSON_FILES})
- install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/windows/${config_file}.json DESTINATION ${CMAKE_INSTALL_LIBDIR})
- endforeach(config_file)
+ install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/windows/${config_file}.json DESTINATION ${CMAKE_INSTALL_BINDIR})
+ endforeach()
endif()