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

Add CMake installation rules #2184

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ahesham-arm
Copy link
Contributor

Add installation rules for all the binary targets.

Targets are installed under <CMAKE_INSTALL_PREFIX>/bin/<CONFIG> where <CONFIG> is CMAKE_BUILD_TYPE for single-config generators, e.g. Unix Makefiles and Ninja, or the build configuration for multi-config generators, e.g. Ninja Multi-Config and Visual Studio.

This creates the target install on Unix and INSTALL on Windows.

Add installation rules for all the binary targets.

Targets are installed under `<CMAKE_INSTALL_PREFIX>/bin/<CONFIG>`
where `<CONFIG>` is `CMAKE_BUILD_TYPE` for single-config generators,
e.g. Unix Makefiles and Ninja, or the build configuration for
multi-config generators, e.g. Ninja Multi-Config and Visual Studio.

This creates the target `install` on Unix and `INSTALL` on Windows.
Copy link
Contributor

@bashbaug bashbaug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please also check if we need to install the Vulkan SPIR-V files? See: #2055

At some point it would be nice to install the OpenCL SPIR-V files in a sensible place also (and ideally, to auto-build them if any of the source spvasm changes), but this is less critical because the path to the OpenCL SPIR-V files can be set using --spirv-binaries-path.

@ahesham-arm
Copy link
Contributor Author

Can you please also check if we need to install the Vulkan SPIR-V files? See: #2055

You're right, yes they do. I note that the CMakeLists.txt for the Vulkan shaders is wrong in two ways:

  1. Project configuration and building are two distinct steps. execute_process runs in configuration time and should not be used for generating files. Instead, add_custom_command and add_custom_target should be used to define build targets that get executed at build times.
  2. The source directory should never be modified by the configuration or build processes, thanks for fixing that in compile Vulkan SPIR-V shaders in CMAKE_CURRENT_BINARY_DIR #2055.

@ahesham-arm
Copy link
Contributor Author

Fixed the way the Vulkan shaders are generated in #2199 as a requirement for having correct installation rules for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants