Commit Graph

43 Commits

Author SHA1 Message Date
Peter Kokot
0fedf1592c Find*: Update *_FOUND variables
This marks all `<PACKAGENAME>_FOUND` result variables as deprecated
where possible (for `<PackageName>` find modules) to make it clearer
which variable to use.

In CMake 3.3, the FindPackageHandleStandardArgs module was refactored to
set both `<PackageName>_FOUND` and uppercase `<PACKAGENAME>_FOUND`
result variables to the same values. Before that, the FOUND_VAR argument
could be used to set the result variable.

* FindMatlab: Uppercased MATLAB_FOUND is not mentioned as it was never
  documented.
* Documentation for FindPythonInterp and FindPythonLibs modules synced
  accordingly to their deprecation (3.12 instead of 4.2).
* OPENGL_FOUND: deprecation version synced with other find modules.
* DevIL_FOUND was introduced in CMake 3.8. The uppercased variant not
  mentioned as it was previously never documented.

Fixes: #27242
2025-09-23 21:40:58 +02:00
Peter Kokot
1526655507 Find*: Add intro code blocks
- Added intro code blocks showing how to use find modules.
- Synced modules documentation.
- Extended few examples to make the intro code blocks fit into the
  modules descriptions.
- Synced some RST formatting, variables descriptions and positions.
- Removed few redundant internal comments.

Issue: #26555
2025-08-04 21:26:12 +02:00
Peter Kokot
4376b15bae FindVulkan: Update documentation
- Refactored components section.
- Module documentation synced with other similar find modules.
- Added examples section.
- Removed version note for VULKAN_SDK (this environment variable was
  used since 3.7 when module got introduced to CMake).
- Added missing volk component.
2025-04-22 03:00:32 +02:00
lumina37
74bb57cae9 FindVulkan: Search for dxc / volk debug libraries
Fixes: #25722
Signed-off-by: lumina37 <starry.qvq@gmail.com>
2025-03-19 09:14:53 -04:00
Kitware Robot
1772622772 LICENSE: Replace references to Copyright.txt with LICENSE.rst
```
git grep -lz 'Copyright.txt or https://cmake.org/licensing ' |
  while IFS= read -r -d $'\0' f ; do
    sed -i '/Copyright.txt or https:\/\/cmake.org\/licensing / {
              s/Copyright.txt/LICENSE.rst/
            }' "$f" ; done
```
2025-03-03 10:43:35 -05:00
Nikita Nemkin
d138555959 Help: Use Title Case for all "Imported Targets" sections 2025-01-31 12:23:29 -05:00
Brad King
7afa58b15d Modules/Find*: Include FindPackageHandleStandardArgs normally
Since commit d74210a8bd (CMP0017: Remove support for OLD behavior,
2024-11-17) we can rely on CMP0017's NEW behavior unconditionally.
Calling `include(FindPackageHandleStandardArgs)` in a builtin module
will always get the builtin `FindPackageHandleStandardArgs`.
2025-01-30 08:53:12 -05:00
Brad King
c283aafe62 CMP0057: Remove support for OLD behavior 2025-01-22 10:40:53 -05:00
Juan Ramos
3cd64287fe Modules: Fix CMP0159 warnings in modules when tracing
Closes: #25829
2024-03-29 13:51:59 -07:00
Juan Ramos
49ebf18dd0 FindVulkan: Update detection for glslang 14.0.0
Allow `oglcompiler`, `osdependent`, `machineindependent`, and
`genericcodegen` to be optional static library components.

Fixes: #25583
2024-02-07 10:04:48 -05:00
Ralf Habacker
829f1b5be4 FindVulkan: Add more search paths for MINGW when cross compiling
Fixes: #24536
2023-02-28 08:32:01 +01:00
Brad King
8ad94b1977 Merge topic 'FindVulkan-tolerate-FATAL_ERROR'
9063674517 Help: Add 3.24 release note about FindVulkan component enforcement
bc01362368 FindVulkan: Restore tolerance of unknown FATAL_ERROR component

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7583
2022-08-17 10:16:10 -04:00
Brad King
bc01362368 FindVulkan: Restore tolerance of unknown FATAL_ERROR component
`find_package(Vulkan REQUIRED FATAL_ERROR)` calls exist in the wild, but
`find_package` does not have a `FATAL_ERROR` option.  We silently
tolerated such calls prior to commit 6e4d20921d (FindVulkan: Add
component for `shaderc_combined`, 2022-05-18, v3.24.0-rc1~111^2~5), by
treating the argument as a component and ignoring it.  Restore tolerance
by removing the component and warning about it.

Fixes: #23849
2022-08-17 09:52:12 -04:00
Brad King
b141445f8f FindVulkan: Move dxc component docs into definition list 2022-07-25 14:08:02 -04:00
Brad King
96573aec1c Merge branch 'backport-3.24-FindVulkan-relnotes' 2022-07-25 14:04:56 -04:00
MACHIZAUD Andréa
0b538e4002 FindVulkan: Add missing 3.24 release notes 2022-07-25 14:04:43 -04:00
Brad King
db66c384fc FindVulkan: Format component documentation as definition list 2022-07-25 14:04:43 -04:00
HellsingDarge
1277b873c9 FindVulkan: Add dxc (DirectX Shader Compiler) component 2022-07-20 17:06:31 -04:00
Aiden Lambert
f849e33452 FindVulkan: Add 'volk' component 2022-06-22 09:46:46 -04:00
MACHIZAUD Andréa
d9b4264cb8 FindVulkan: Add component for MoltenVK 2022-05-23 00:16:32 +02:00
MACHIZAUD Andréa
acdb5fe0e8 FindVulkan: Add component for glslc and glslangValidator
For backward compatibility with previous CMake versions they are implicitly added to the list of components
2022-05-18 23:16:11 +02:00
MACHIZAUD Andréa
998ee49779 FindVulkan: ensure policy CMP0057 is NEW to use IN_LIST with if() 2022-05-18 23:16:11 +02:00
MACHIZAUD Andréa
9f8720e74c FindVulkan: Add component for glslang 2022-05-18 23:16:09 +02:00
MACHIZAUD Andréa
8d133f49e3 FindVulkan: Add component for SPIRV-Tools 2022-05-18 23:15:50 +02:00
MACHIZAUD Andréa
6e4d20921d FindVulkan: Add component for shaderc_combined 2022-05-18 23:15:48 +02:00
MACHIZAUD Andréa
2f46b8d723 FindVulkan: Move mark_as_advanced right after find_* calls. 2022-05-13 23:12:29 +02:00
MACHIZAUD Andréa
08a420af4a FindVulkan: Factorize code for library/executable search 2022-05-13 23:09:05 +02:00
Ralf Habacker
db8bd5965f FindVulkan: Fix finding versions < 1.2.175 2021-11-10 16:11:46 +01:00
Ralf Habacker
caeaabb356 FindVulkan: Add version support
The version is constructed in the form <major>.<minor>.<patch> e.g.
1.2.189.
2021-10-27 20:50:55 +02:00
PCJohn
668ba68a7a FindVulkan: add Vulkan::Headers and Vulkan::glslangValidator targets
The `Vulkan::Headers` target complements existing Vulkan::Vulkan target.
It is the same except it omits the Vulkan library which supports
applications that loads the Vulkan library in at runtime.

The `Vulkan::glslangValidator` target provides the glslangValidator
executable which is the tool for converting between shader languages
(GLSL, SPIR-V, etc.).
2021-05-24 12:53:15 -04:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Kitware Robot
496ec6036f Help: Add Sphinx 'versionadded' directives to each top-level document
Run the `Utilities/Sphinx/update_versions.py` script to add initial
markup to every top-level document and find module.

Issue: #19715
2020-07-06 10:23:20 -04:00
Ryan Kawicki
467509d767 FindVulkan: Support for finding glslc
The GLSL SPIR-V compiler is part of the Vulkan SDK and may be used
by projects for compiling shaders as part of the build process.
This is not strictly required to build a Vulkan application, which
is why the variable is not part of the REQUIRED_VARs for the module.
2020-06-26 20:57:06 -05:00
Patric Schmitz
590cde6125 FindVulkan: Prefer VULKAN_SDK env var before standard paths on UNIX
Also document the variable.

Fixes: #18346
2020-05-06 16:07:49 +02:00
pheonix xx
5c40e5ddb4 FindVulkan: Prefer VULKAN_SDK env var before standard paths
Reference the environment variable as HINTS instead of PATHS.

Fixes: #20637
2020-04-28 07:25:55 -04:00
NeroBurner
6cc4ca31d5 Fix repeated word in FindVulkan.cmake 2019-07-18 17:25:04 -04:00
Bartosz Kosiorek
cb811d11ce Help: Improve description of modules 2019-04-23 10:39:34 +02:00
Kitware Robot
df4ed1e9ff Help: Convert remaining modules to block-style comments 2018-10-22 11:09:34 -04:00
Rolf Eike Beer
d6883801cd Find*: always include FPHSA shipped with CMake 2018-04-02 10:48:31 +02:00
Matthäus G. Chajdas
723955cd2b FindVulkan: Fix for SDK versions < 1.0.42 on 32-bit Windows
Before Vulkan 1.0.42, the SDK would add the Bin directory to `PATH`,
which was confusing the 32-bit search on Windows.  Avoid such confusion
by ignoring the `PATH` when looking for the 32-bit version.

Vulkan 1.0.42 fixed the whole problem by moving the libraries into Lib,
Lib32, so this is strictly a compatibility fix for old SDKs.
2017-03-06 13:32:41 -05:00
Brad Davis
8e58f360f5 FindVulkan: Update for LunarG SDK import library location on Windows
As of at least 1.0.42 of the LunarG SDK, the `vulkan-1.lib` import
library on Windows is stored in `${VULKAN_SDK}/Lib` or
`${VULKAN_SDK}/Lib32`.
2017-03-02 10:02:20 -05:00
Brad King
86578eccf2 Simplify CMake per-source license notices
Per-source copyright/license notice headers that spell out copyright holder
names and years are hard to maintain and often out-of-date or plain wrong.
Precise contributor information is already maintained automatically by the
version control tool.  Ultimately it is the receiver of a file who is
responsible for determining its licensing status, and per-source notices are
merely a convenience.  Therefore it is simpler and more accurate for
each source to have a generic notice of the license name and references to
more detailed information on copyright holders and full license terms.

Our `Copyright.txt` file now contains a list of Contributors whose names
appeared source-level copyright notices.  It also references version control
history for more precise information.  Therefore we no longer need to spell
out the list of Contributors in each source file notice.

Replace CMake per-source copyright/license notice headers with a short
description of the license and links to `Copyright.txt` and online information
available from "https://cmake.org/licensing".  The online URL also handles
cases of modules being copied out of our source into other projects, so we
can drop our notices about replacing links with full license text.

Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority
of the replacements mechanically.  Manually fix up shebang lines and trailing
newlines in a few files.  Manually update the notices in a few files that the
script does not handle.
2016-09-27 15:14:44 -04:00
Matthäus G. Chajdas
adf4df28ca Add FindVulkan.cmake.
This adds FindVulkan with corresponding tests.
2016-06-08 12:44:03 -04:00