summaryrefslogtreecommitdiffstats
path: root/external/CMakeLists.txt
Commit message (Collapse)AuthorAge
* Update build to allow setting external mimalloc path (#8676)Lujin Wang2025-10-11
| | | | Update the build to allow setting user-specific path for the external module mimalloc.
* Fix SPIRV headers precedence (#8481)Jay Kwak2025-09-19
| | | | | | | | | | Remove SYSTEM flag from SPIRV-Headers to fix MacOS header precedence. When the path is registered as SYSTEM, it is used with `-isystem` option not `-I` option and it gets less searching order on MacOS. When spirv.h is installed on the system directory, it will end up using the system installed spirv.h, which is most likely an older version than we should use.
* Set default mimalloc for spirv-tools but allow user to override (#8460)Gangzheng Tong2025-09-17
| | | | | | | | | | | | | | | | | | | | | | | | This PR resolves a configuration conflict where the SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC option was defined twice with different defaults, causing user settings to be overridden. Changes: - Removed duplicate definition in external/CMakeLists.txt that only applied to WIN32 - Define default in main CMakeLists.txt - ON by default for Windows - OFF by default for other platforms (still need to resolve crashes so set it to `OFF` for now) Preserved user configuration - explicit -DSLANG_ENABLE_SPIRV_TOOLS_MIMALLOC=value settings are now properly respected Related to https://github.com/shader-slang/slang/issues/8158 --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Enable static mimalloc in Spriv-Tools (#8419)Gangzheng Tong2025-09-16
| | | | | | | | | | | | | | | | | | | | | | * Added optional mimalloc integration for SPIRV-Tools to improve compilation performance * Cloning `mimalloc` repo to external/ on demand during cmake config * Enabled by default on Windows, configurable via `SLANG_ENABLE_SPIRV_TOOLS_MIMALLOC` CMake option, to enable static mimalloc build in spirv-tools. * There are some crashes in Linux and Mac with static mimalloc enabled, likely due to the system malloc and mimalloc mixed usage. This might be expected as mimalloc in spirv-tools is not extensively tested according to https://github.com/KhronosGroup/SPIRV-Tools?tab=readme-ov-file#dependency-on-mimalloc. So by default only Windows has this enabled. Close: https://github.com/shader-slang/slang/issues/8158 --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Add more system dependency options to CMake (#7987)Niklas Korz2025-08-20
| | | | | | | | | | | | | | | | | | | | | | | | | Allows opt-in for sourcing the following dependencies from the system, instead of using the vendored ones: - miniz - lz4 - vulkan-headers - spirv-tools - glslang (some of these already had options that weren't working, as either it expected them to be static libraries or it was expecting to be embedded in another CMakeList that should provide the package, instead of finding the package itself) This is based on a patch we currently maintain inside nixpkgs, but as it frequently conflicts with new slang releases, it would be nice to see get this upstream. --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Sam Estep <sam@samestep.com>
* CMake: Guard inclusion of VULKAN_HEADERS and SPIRV-Headers (#8124)Sergei Popov2025-08-19
| | | | | | | | | | | Don't include the VULKAN_HEADERS and SPIRV-Headers submodule if they are already included. Fix for the https://github.com/shader-slang/slang/issues/7898. --------- Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
* Fix SLANG_USE_SYSTEM_SPIRV_HEADERS=TRUE (#7916)Ellie Hermaszewska2025-07-25
| | | | | | find_package is locally scoped, so like other find_packages we should do it at the top level Closes https://github.com/shader-slang/slang/issues/7643
* Fix SLANG_USE_SYSTEM_SPIRV_HEADERS (#7371)Emil Imbert Villumsen2025-06-13
| | | | | | | | | | | | | | | | | | * Use aliased SPIRV-Headers::SPIRV-Headers to also work with an installed SPIRV-Headers SPIRV-Headers standalone is only defined when using sources directly. When consuming an installed SPIRV-Headers via find_package, the full SPIRV-Headers::SPIRV-Headers must be used. The full syntax is supported by both source and installed builds. * Fix SLANG_USE_SYSTEM_SPIRV_HEADERS - Use find_package to bring in SPIRV-Headers cmake targets - Set SPIRV-Headers_SOURCE_DIR as a workaround when including spirv-tools - Query cmake for SLANG_SPIRV_HEADERS_INCLUDE_DIR location, supporting default, SLANG_OVERRIDE_SPIRV_HEADERS_PATH and find_package builds. - Cleanup unnecessary SPIRV_HEADER_DIR (unconditionally overwritten in spirv-tools)
* Re-enable running slang-rhi-tests (#7360)Simon Kallweit2025-06-13
| | | | | | | | | | | | | | | | | | | | * enable building slang-rhi-tests * re-enable running slang-rhi-tests * format code * fix typo * update slang-rhi * build slang-rhi-tests without glfw dependency * skip fence tests --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: amey asgaonkar <160177341+aasgaonkar@users.noreply.github.com>
* Disable coopvec while using Agility SDK and until graphics driver supports ↵Jay Kwak2025-06-06
| | | | | | | it (#7357) * Disable coopvec tests until we have the driver support * Remove conflicting agility sdk binaries
* Update slang-rhi (#7303)Simon Kallweit2025-06-06
| | | | | | | | | | | | | | | | | | | | | * update slang-rhi * adapt to new slang-rhi API * enable slang-rhi agility sdk * fix handling empty list * disable failing slang-rhi tests * format code * fix slang-rhi-tests ci step * skip running slang-rhi-tests --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Revert "Remove a workaround disabling dxc-fetch" (#7348)Jay Kwak2025-06-04
| | | This reverts commit 2d98381501140bdf519f2a28c417b205187525c7.
* Change SLANG_OVERRIDE_xxx_PATH and fix header file path (#7207)Lujin Wang2025-05-30
| | | | | | | | | | | | | | | | | | | | | | | | * Fix lua header file path Add two missed files in #7167 * Fix lua header file path Add two missed files in #7167 * Leave lua/ in the path to avoid name conflict * Remove xxx from path of SLANG_OVERRIDE_xxx_PATH Change SLANG_OVERRIDE_xxx_PATH from path-to-parent-folder/xxx to path-to-parent-folder and add "xxx/" back to "#include", which helps to avoid the potential name conflict of external tools. * format code --------- Co-authored-by: Yong He <yonghe@outlook.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Remove a workaround disabling dxc-fetch (#7276)Jay Kwak2025-05-30
|
* Update build to allow setting more external paths (#7044)lujinwangnv2025-05-10
| | | | | | * Update build to allow setting more external paths Update the build to allow setting user-specific paths for the external modules: glm, imgui, slang-rhi, and tinyobjloader.
* disable slang-rhi cmake install (#6900)Simon Kallweit2025-04-24
|
* update slang-rhi (#6587)Simon Kallweit2025-04-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update slang-rhi submodule * slang-rhi API changes * disable agility sdk * fix texture creation * update formats in tests * Extent3D rename * use 1 mip level for 1D textures for Metal * fix texture upload * update to latest slang-rhi * update slang-rhi * format code * update slang-rhi * do not run texture-intrinsics test on metal * update slang-rhi * deal with failing tests * fix more tests * update slang-rhi --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com> Co-authored-by: Simon Kallweit <simon.kallweit@gmail.com>
* Fix MSVC warning D9025 when building external dependencies. (#6630)Yong He2025-03-18
| | | | | * Fix MSVC warning D9025 when building external dependencies. * revert unrelated change.
* Update build to allow setting external paths (#6528)jarcherNV2025-03-07
| | | | | | | * Update build to allow setting external paths Update the build to allow setting user-specific paths for the external modules. This allows building Slang without also fetching the external modules, assuming they are already present elsewhere locally.
* Fix and document static build (#6374)Ellie Hermaszewska2025-02-18
| | | | | | | | | | | * Set static stbi flag for static builds * Add missing SYSTEM directive for external includes * Add instructions for linking statically against slang --------- Co-authored-by: Yong He <yonghe@outlook.com>
* slang-rhi cmake integration (#6261)Simon Kallweit2025-02-07
| | | | | | | * update slang-rhi cmake integration * disable fetching slang * update slang-rhi
* Make slang-rhi's NVAPI support conditional on SLANG_ENABLE_NVAPI (#5855)Ellie Hermaszewska2024-12-12
| | | | | | | | | * bump slang-rhi * More precise slang-rhi settings --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Correct include dir for libslang (#5539)Ellie Hermaszewska2024-11-13
| | | | | | | | This stops adding the repo root to the include path for anything linking with slang. This enabled a bunch of convenient includes, but might lead to confusing behavior for anyone including slang. Not to mention differences including it from an install vs source. Co-authored-by: Yong He <yonghe@outlook.com>
* Use correct slang source dir for slang-rhi (#5534)Ellie Hermaszewska2024-11-12
| | | | | Fixes https://github.com/shader-slang/slang/issues/5481 We should consider changing the CMAKE_BINARY_DIR usages also in our build descs
* Update Slang-RHI to get recent WGPU fixes (#5467)Anders Leino2024-11-01
| | | | | | This helps to address issue #5222. Also disable Slang-RHI from fetching DXC and Agility SDK, since that seems to break our tests. (See issue #5474.)
* format cmake files (#5406)Ellie Hermaszewska2024-10-29
| | | | | | | | | * format cmake files * format code --------- Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
* Lower minimum CMake version to 3.22 (#5295)Ellie Hermaszewska2024-10-15
| | | | | | | * Lower minimum CMake version to 3.22 Reverts https://github.com/shader-slang/slang/pull/4193 * Update build instructions to mention older CMake versions
* update slang-rhi (#5234)Simon Kallweit2024-10-07
| | | | | * update to latest slang-rhi * do not build slang-rhi examples
* Allow building using external dependencies (#5076)Tobias Frisch2024-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add options to prevent usage of own submodules Signed-off-by: Jacki <jacki@thejackimonster.de> * Allow using external unordered dense headers Signed-off-by: Jacki <jacki@thejackimonster.de> * Link system wide installed unordered dense Signed-off-by: Jacki <jacki@thejackimonster.de> * Allow external header usage for lz4 and spirv Signed-off-by: Jacki <jacki@thejackimonster.de> * Add more options to disable targets Signed-off-by: Jacki <jacki@thejackimonster.de> * Add option to provide explizit path for spirv headers and remove earlier options that break the build process Signed-off-by: Jacki <jacki@thejackimonster.de> * Rename options to use common prefix Signed-off-by: Jacki <jacki@thejackimonster.de> * Fix indentation for the cmake changes Signed-off-by: Jacki <jacki@thejackimonster.de> * Add advanced_option function for cmake * Normalize includes between system and submodule dependencies Fix any before-accidentally-working problems * Add option for enabling/disabling slang-rhi Signed-off-by: Jacki <jacki@thejackimonster.de> * Pass correct include path for cpu tests * Correct include path --------- Signed-off-by: Jacki <jacki@thejackimonster.de> Co-authored-by: Ellie Hermaszewska <ellieh@nvidia.com>
* Disable wgpu on linux (#5186)Simon Kallweit2024-09-30
| | | | | | | | | * remove setting CMAKE_SYSTEM_PROCESSOR we will need a proper toolchain file to setup cross-compilation * disable slang-rhi webgpu backend on linux this is a temporary fix for allowing the release workflow to run
* update slang-rhi with initial wgpu support (#5137)Simon Kallweit2024-09-23
| | | | | | | | | * update slang-rhi with initial wgpu support * update slang-rhi --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Fix dx on vk with rhi (#5086)Ellie Hermaszewska2024-09-19
| | | | | Requires this PR https://github.com/shader-slang/slang-rhi/pull/40 Co-authored-by: Yong He <yonghe@outlook.com>
* fix slang-rhi compile error (#4979)Simon Kallweit2024-08-31
|
* Draft: integrate slang-rhi (#4970)Simon Kallweit2024-08-30
| | | | | | | | | | | | | | | | | | | | | * add slang-rhi submodule * refactor render-test to use slang-rhi and remove OpenGL support * remove -vk -glsl tests * remove gl test * disable failing test * allow recursive submodules in github actions * update slang-rhi * update slang-rhi --------- Co-authored-by: Yong He <yonghe@outlook.com>
* Fix warning messages for MSVC and external projects (#4730)Jay Kwak2024-07-24
| | | Closes #4692
* Enable warnings-as-error for CI (#4659)Jay Kwak2024-07-18
| | | | | | | | | Enable warnings-as-error for CI Closes #4664. Uses glslang commit that fixed a compiler warning Fixes a recent warning from external/CMakelist.txt A new macro, `SLANG_MAYBE_UNUSED` is added for a future need.
* Squash warnings on gcc and clang (#4669)Ellie Hermaszewska2024-07-17
|
* [gfx] metal backend skeleton (#4223)Simon Kallweit2024-05-27
| | | | | | | | | | | | | | | | | | | | * add metal-cpp submodule * add metal-cpp cmake target * gfx metal backend skeleton * add premake support * add foundation framework * add metal-cpp include to premake * update vs project file --------- Co-authored-by: Simon Kallweit <skallweit@nvidia.com> Co-authored-by: Jay Kwak <82421531+jkwak-work@users.noreply.github.com>
* cmake: add options to disable gfx, test, example, ... targets (#3572)Lukas Lipp2024-02-14
| | | | | | | | | | | | | | | | | | | | | | | * cmake: add options to disable gfx, test and example targets * cmake: enable gfx, test, example targets by default * cmake: use same naming scheme * cmake: option to disable slangd and slangc targets * cmake: option for enabling slang-rt target * cmake: option to deactivate llvm and glslang * cmake: better option text * cmake: remove duplicate slang-llvm option * doc: update docs/building.md --------- Co-authored-by: Yong He <yonghe@outlook.com>
* WIP: CMake (#3326)Ellie Hermaszewska2023-12-08
* More robust input and output selection in generator tools * Add cmake build system * Get slang-test running with cmake * Bump lz4 and miniz dependencies * Make cmake build more declarative * Correct preprocessor logic in slang.h * Add cuda test to compute/simple * Remove empty cmake files * output placement for cmake, and commenting * Correct include paths in spirv-embed-generator * Format cmake with gersemi * Make cmake build clerer * Neaten header generation Also work around https://gitlab.kitware.com/cmake/cmake/-/issues/18399 by introducing correct_generated_properties to set the GENERATED flag in the correct scope * remove unused files * use 3.20 to set GENERATOR property properly * spelling * more flexible linker arg setting * replace slang-static with obj collection * Set rpath and linker path correctly * neaten generated file generation * tests working with cmake build * fix premake5 build * comment and neaten cmake * remove unnecessary dependency * Build aftermath example only when aftermath is enabled * Add slang-llvm and other dependencies * Put modules alongside binaries * Find slang-glslang correctly * Better option handling * comments * add llvm build test * Better option handling * cmake wobble * use UNICODE and _UNICODE * remove other workflows * use ccache * neaten * limit parallel for llvm build * use ninja for build * Windows and Darwin slang-llvm builds * cache key * verbose llvm build * cl on windows * sccache and cl.exe * use cl.exe * Correct package detection * less verbosity * Simplify miniz inclusion * fix build with sccache * Neaten llvm building * neaten * Neaten slang-llvm fetching * more surgical workarounds * Add ci action * Get version from git * better variable naming * add missing include * clean up after premake in cmake * more docs on cmake build * ci wobble * add imgui target * more selective source * do not download swiftshader * Some missing dependencies * only build llvm on dispatch * Disable /Zi in CI where sccache is present * simplify * set PIC for miniz * set policies before project * reengage workaround * more runs on ci * Add cmake presets * Add cpack * move iterator debug level to preset * Correct lib flag * simplify action * Neaten cmake init * Add todo * Add simple test wrapper * Add tests to workflow presets * rename packing preset * Correctly set definitions * docs * correct preset names * Make slang-test depend on test-server/test-process * neaten * use workflow in actions * install docs * Correct module install dir * debug dist workflow * Install headers * neaten header globbing * Neaten dependency handling * make lib and bin variables * Do not set compiler for vs builds, unnecessary * docs * allow setting explicit source for target * maintain archive subdir * cmake docs * install headers * place targets into folders * cmake docs * nest external projects in folder * remove name clash * Neater external packages * meta targets in folder structure * cleaner slang-glslang dll * Add missing static directive to slang-no-embedded-stdlib * more robust module copying * make slang-test the startup project * folder tweak * Make FETCH_BINARY the default on all platforms * Set DEBUG_DIR * add natvis files to source * skip spirv tests * remove test step from debug dist * Add build to .gitignore * redo warnings to be more like premake * Update imgui * clean more premake files * Disable PCH for glslang, gcc throws a warning * Add /MP for msvc builds * warning wobble * Add script to build llvm * Add slang-llvm and generators components * Build slang-llvm in ci * comments * fetch llvm with git * better abi approximation for cache * better sccache key * formatting * Correct logic around disabling problematic debug info for ccache * exclude gcc and clang from windows ci * Make dist workflows use system llvm * naming * restore normal dist builds * formatting * run tests in ci * Correct slang-llvm url setting * Rely on the system to find the test tool library * actions matrix wiggle * cope with OSX ancient bash * Correct compilers on windows * more ci debugging * Correct rpath handling on OSX * neaten * correct path to slang-llvm * Correct rpath separator on osx * Find slang-llvm correctly * smoke tests only on osx * ci wobble * Give MacOS module a dylib suffix * get swiftshader correctly * cope with bsd cp * remove debug output * full tests on osx * ci wobble * Add some vk tests to expected failures * simplify ci * ci wobble * exclude dx12 tests from github ci * remove cmake code for building llvm * warnings * warnings as errors for cl * spirv-tools in path * add aarch64 ci build * Add SLANG_GENERATORS_PATH option for prebuilt generators * neaten * Correct generator target name * remove yaml anchors because github actions does not support them * Demote CMake in docs Also add info on cross compiling * Restore premake CI * use minimal ci for cmake * Write miniz_export for premake build and .gitignore it * Mention build config tool options in docs * Remove redefined macro for miniz * regenerate vs project