diff options
| author | ov-l <186710607+ov-l@users.noreply.github.com> | 2024-12-03 18:50:11 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-03 17:50:11 +0000 |
| commit | 5d8cf475b352ab517c565ccee59461640da63a2a (patch) | |
| tree | 8e9a311cc712df112ffe290821751b0276e10f97 /cmake | |
| parent | 6c655ca927a440d1f03339295235fce2a764c26b (diff) | |
Add SlangConfig.cmake with slang build targets (#5674)
* Modify package config
* Apply formatting.
* Make sure build works for Emscripten
* Add documentation on install target.
---------
Co-authored-by: obhi-d <obi.de.online@gmail.com>
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/SlangConfig.cmake.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/cmake/SlangConfig.cmake.in b/cmake/SlangConfig.cmake.in new file mode 100644 index 000000000..253958690 --- /dev/null +++ b/cmake/SlangConfig.cmake.in @@ -0,0 +1,20 @@ + +@PACKAGE_INIT@ + +if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten") + include("${CMAKE_CURRENT_LIST_DIR}/slangTargets.cmake") + check_required_components("slang") +endif() + +if(@SLANG_ENABLE_SLANGC@) + + find_program(SLANGC_EXECUTABLE "slangc" HINTS ENV PATH "${PACKAGE_PREFIX_DIR}/bin") + + if (NOT SLANGC_EXECUTABLE) + message(STATUS "slangc executable not found; ensure it is available in your PATH.") + endif() + + set(SLANG_EXECUTABLE ${SLANGC_EXECUTABLE} CACHE STRING "Path to the slangc executable") + +endif() + |
