Sven van Haastregt
70d125b924
cmake: Don't link SPVRemapper into glslang executable
...
The functionality of `libSPVRemapper` is only used by the
`spirv-remap` executable, so don't link it into the `glslang`
executable.
2023-08-18 09:52:54 -06:00
Nathaniel Cesario
79a9f7f652
Fix continuous deployment
...
There should not be a '/' after $ENV{DESTDIR} in the cmake install script.
This change also:
- Uses lukka/get-cmake github action consistently across jobs
- Add the glslang binary to the continuous deployment archive
2023-08-07 10:52:22 -06:00
Arcady Goldmints-Orlov
396596ca4a
Replace GlobalLock functions with std::mutex
...
The usage of GetGlobalLock/ReleaseGlobalLock/InitGlobalLock is replaced
by std::lock_guard which is available as of c++11, and the functions are
removed from the OSDependent ossource.cpp files.
The standalone glslang binary now explicitly depends on OSDependent, as
nothing in in the glslang library uses those functions anymore and they
are not implicitly picked up by the linker.
2023-07-31 20:12:51 -06:00
Tim Biermann
171a322025
respect destdir for compat symlink
2023-07-31 14:04:22 -06:00
Nathaniel Cesario
865fe73958
cmake: Fix symlink on Windows
...
Copy the old glslangValidator name on Windows rather than creating a
symlink. While cmake 3.13 and above supports creating symlinks on
Windows, a security policy change is required in general to allow
the creation of symlinks for non-trusted users. See
https://learn.microsoft.com/en-us/windows/security/threat-protection/security-policy-settings/create-symbolic-links
Fixes #3268 .
2023-07-19 17:16:37 -06:00
Nathaniel Cesario
856e280502
cmake: Rename glslang to glslangValidator
...
Rename glslangValidator to glslang and adds a glslangValidator symlink
to the build and install directories.
Closes #47 .
2023-07-18 15:23:50 -06:00
juan-lunarg
5793fbd624
cmake: Fix CMake 3.27 warnings
...
The FindPythonInterp and FindPythonLibs modules, which have
been deprecated since CMake 3.12, have been removed by policy
CMP0148. Port projects to FindPython3, FindPython2, or FindPython.
2023-06-16 16:12:26 -04:00
Sruthik P
bc6b2bc17a
glslang: Do not link with pthread on QNX
...
On QNX, pthread APIs are provided as part of libc and a separate pthread
library does not exist.
This change updates the makefile of glslang to not link with pthread on
QNX, thereby enabling glslang to be built for QNX platforms.
2023-05-03 09:09:01 -06:00
Chuang Zhu
dfc97740ff
Use CMAKE_INSTALL_FULL_LIBDIR in compat cmake files
...
According to
https://cmake.org/cmake/help/v3.25/module/GNUInstallDirs.html ,
CMAKE_INSTALL_LIBDIR can be an absolute path. For instance, Nixpkgs
[defined it to an absolute path in /nix/store](3d17b4c305/pkgs/development/tools/build-managers/cmake/setup-hook.sh (L101) ).
The output in this case is:
# result-glslang/lib/cmake/glslangTargets.cmake:5
include("${CMAKE_CURRENT_LIST_DIR}/../..//nix/store/3mif2zibig0cilk5dbz334278n0vlq9s-glslang-1.3.231.0/lib/glslang/glslang-targets.cmake")
Signed-off-by: Chuang Zhu <git@chuang.cz>
2023-05-02 15:46:45 -06:00
Moritz Heinemann
f5fa593143
move ResourceLimits from StandAlone to glslang dir ( Fix #3064 )
2023-02-15 20:06:26 +01:00
Jan Engelhardt
4386679bcd
build: set SOVERSION on all libraries
...
Commit fbe9a23baf2cb020fe3f80d68d972e2a97d9b954 erroneously
only added SOVERSION to libglslang.so, but none of the others
that are produced.
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
2023-02-03 15:19:35 -07:00
Sven-Hendrik Haase
88fd417b0b
Fix locations of cmake files in side compat shims
...
In https://github.com/KhronosGroup/glslang/pull/3027 , the installed cmake files were
stuck into a /cmake subdir but this isn't reflected in these compatibility shims.
2022-11-16 16:54:09 -07:00
Andrea Pappacoda
1b32fc8eb2
build: install glslang-config.cmake to libdir
...
As glslang ships architecture dependant files, the Config file should be
installed to libdir, not datadir. See
https://github.com/KhronosGroup/glslang/pull/2989#discussion_r955367103
for more details.
Here's the diff between the install tree before and after this patch:
$ diff <(tree install-datadir) <(tree install)
1c1
< install-datadir
---
> install
74,99c74,98
< ├── lib
< │ ├── cmake
< │ │ ├── glslang-default-resource-limitsTargets.cmake
< │ │ ├── glslangTargets.cmake
< │ │ ├── glslangValidatorTargets.cmake
< │ │ ├── HLSLTargets.cmake
< │ │ ├── OGLCompilerTargets.cmake
< │ │ ├── OSDependentTargets.cmake
< │ │ ├── spirv-remapTargets.cmake
< │ │ ├── SPIRVTargets.cmake
< │ │ └── SPVRemapperTargets.cmake
< │ ├── libGenericCodeGen.a
< │ ├── libglslang.a
< │ ├── libglslang-default-resource-limits.a
< │ ├── libHLSL.a
< │ ├── libMachineIndependent.a
< │ ├── libOGLCompiler.a
< │ ├── libOSDependent.a
< │ ├── libSPIRV.a
< │ └── libSPVRemapper.a
< └── share
< └── glslang
< ├── glslang-config.cmake
< ├── glslang-config-version.cmake
< ├── glslang-targets.cmake
< └── glslang-targets-debug.cmake
---
> └── lib
> ├── cmake
> │ ├── glslang-default-resource-limitsTargets.cmake
> │ ├── glslangTargets.cmake
> │ ├── glslangValidatorTargets.cmake
> │ ├── HLSLTargets.cmake
> │ ├── OGLCompilerTargets.cmake
> │ ├── OSDependentTargets.cmake
> │ ├── spirv-remapTargets.cmake
> │ ├── SPIRVTargets.cmake
> │ └── SPVRemapperTargets.cmake
> ├── glslang
> │ ├── glslang-config.cmake
> │ ├── glslang-config-version.cmake
> │ ├── glslang-targets.cmake
> │ └── glslang-targets-debug.cmake
> ├── libGenericCodeGen.a
> ├── libglslang.a
> ├── libglslang-default-resource-limits.a
> ├── libHLSL.a
> ├── libMachineIndependent.a
> ├── libOGLCompiler.a
> ├── libOSDependent.a
> ├── libSPIRV.a
> └── libSPVRemapper.a
101c100
< 15 directories, 83 files
---
> 14 directories, 83 files
2022-08-25 23:15:14 +02:00
MACHIZAUD Andréa
fb64704060
Add unified glslang CMake config collecting glslang-targets targets ( #2989 )
2022-08-02 18:16:03 -06:00
David Neto
36333d1fb9
Fix Cmake rule for extension header generation
...
Allow glslang to be embedded in an enclosing project (such as Shaderc)
2021-10-19 17:32:52 -04:00
amhagan
035a3bbc4a
GL_EXT_spirv_intrinsics - Port extensions
...
Add mechanism to use GL_EXT_spirv_intrinsics headers in glslang.
Ported GL_EXT_shader_realtime_clock as an example.
2021-10-15 14:13:08 -04:00
Nathaniel Cesario
c8ef4f8a9f
cmake: Remove "conditions" from endif
...
See https://cmake.org/cmake/help/latest/command/endif.html and
https://cmake.org/cmake/help/latest/command/if.html .
If the else/endif condition does not match the if condition verbatim,
an error is produced on some versions of cmake. This change removes
these "legacy conditions."
2021-09-30 11:00:09 -06:00
Krzysztof Pilch
bb9746ae2d
Fixed CMake configuration for resource-limits library.
2021-04-09 16:20:01 +02:00
Krzysztof Pilch
3549cd6ec2
Removed condition for glslang-default-resource-limits instalation.
...
This way the limits are available to clients that links statically.
2021-04-08 16:33:29 +02:00
pheonix
c897c3bc23
Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface ( #2442 )
...
* Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface (#2408 )
* Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output.
Improve documentation on existing SpirvToolsDisassemble interface.
* Update pre-processor check - following existing ENABLE_OPT checks.
* Fix not-found header paths for glslangValidator and glslangtests.
* Add spirv_tools/include path where there is an ENABLE_OPT=1 in the BUILD.gn configuration.
2020-11-02 14:40:50 -07:00
John Kessenich
2b77059502
Revert "Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface ( #2408 )"
...
See issue #2413 .
This reverts commit d1929f359a1035cb169ec54630c24ae6ce0bcc21.
2020-10-05 16:58:31 -06:00
pheonix
d1929f359a
Add new SpirvToolsDisassemble API interface + Improve Doc on existing API interface ( #2408 )
...
* Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output.
Improve documentation on existing SpirvToolsDisassemble interface.
* Update pre-processor check - following existing ENABLE_OPT checks.
* Fix not-found header paths for glslangValidator and glslangtests.
2020-10-05 09:59:27 -06:00
John Kessenich
f05c076e26
Revert "Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output. ( #2406 )"
...
This reverts commit 2eed8236d07d50f35c466d723651d86284c60161.
2020-09-27 18:15:41 -06:00
pheonix
2eed8236d0
Add more flexible SpirvToolsDisassemble interface to allow specifying spv_target_env for disassembly output. ( #2406 )
...
Improve documentation on existing SpirvToolsDisassemble interface.
Fix cmake build scripts to account for `spirv-tools` external when -DENABLE_OPT=ON
2020-09-27 17:53:18 -06:00
Ben Clayton
cb261e3c21
License headers: s/Google/The Khronos Group
...
This was a copy-paste screwup, where the first line of the copyright had the company name was updated, but the company name mid way though was not.
2020-07-03 12:21:01 +01:00
Ben Clayton
1d21270ebf
Add missing copyright headers
...
Add copyright headers to build files and scripts.
Simplifies automated scanning for bad license headers.
2020-07-02 16:03:48 +01:00
Travis Fort
fd37e0c0f1
add c wrapper for standalone ResourceLimits and remove that dependency from glslang_c_interface
2020-03-06 10:06:47 -05:00
John Kessenich
e01c847a70
Merge branch 'dj2-install'
2019-11-22 06:24:38 -07:00
Dan Sinclair
04567eb232
Check for ENABLE_SPVREMAPPER flag in CMakeList files.
...
There is a flag to disable the SPVRemapper during the GLSLang build.
That flag is check in some, but not all spots so if you try to build
with SPVRemapper disabled you get CMake errors and compile errors.
This CL fixs up the build so building with -DENABLE_SPVREMAPPER=0 will
complete correclty.
2019-11-21 10:33:32 -05:00
Arfrever Frehtes Taifersar Arahesis
bd69a4fb12
Respect CMAKE_INSTALL_LIBDIR in installed CMake files
...
Fixes #1965
2019-11-18 11:11:55 -08:00
David Dubois
f57feff786
Fix the exports of glslang-default-resource-limits ( #1942 )
2019-10-21 22:31:44 -06:00
James Rumble
c6f7294ced
Handle install vs build include directories
...
Fix target_include_directories to appropriately handle build-tree and the install-tree.
2019-08-06 15:29:31 +01:00
James Rumble
ab6d1499e1
Export glslang targets on installation
...
This allows the targets to be used in other cmake projects. See the following for more details:
https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#creating-packages
https://foonathan.net/blog/2016/07/07/cmake-dependency-handling.html
2019-08-06 14:47:51 +01:00
otakuto
d03da06ac1
Remove execute permissions
2018-08-07 03:16:20 +09:00
John Kessenich
e2156222d3
SPV: Add option to print disassembly in standard form using SPIRV-Tools.
2018-07-02 15:54:12 -06:00
Matthew Albrecht
1199cf92f7
Fixed install for SPIRV, glslang, and hlsl when building shared libs
2018-04-26 14:07:46 -05:00
John Kessenich
17b5f9175d
Merge pull request #969 from d3x0r/patch-1
...
Add option to skip installation
2017-07-04 11:00:42 -06:00
Rohith Chandran
6206091e63
Fix CMake scripts: The set_property script can be used to set only a single property, so now setting the POSITION_INDEPENDENT_CODE property correctly.
2017-07-04 10:53:45 -04:00
d3x0r
4593312490
Update CMakeLists.txt
2017-07-04 06:01:09 -07:00
John Kessenich
3494b4da9b
HLSL: Add an Includer to handle #include.
2017-06-01 11:16:32 -06:00
David Seifert
22afc38b55
Modernise CMake #2
...
This reverts commit cfc69d95afed34e1ba1371df0ddb56f2f491a5cb.
* Change CMAKE_INSTALL_PREFIX default on Windows in order
to prevent permission denied errors when trying to install
to "Program Files".
2017-04-29 11:23:15 +02:00
John Kessenich
cfc69d95af
Revert "Modernise CMake"
2017-04-28 22:04:24 -06:00
David Seifert
5a5699bdbd
Modernise CMake
...
* Use `GNUInstallDirs` in order to respect GNU conventions.
This is especially important for multi-arch/multi-lib setups.
* Specify position independent mode building properly, without
using the historic hack of adding `-fPIC` as a definition.
This makes the build system more portable.
* Only detect C++ (and not C) to slightly speed up configuring.
* Specify C++11 mode using modern CMake idioms.
* Fix some whitespace issues.
2017-04-28 22:46:52 +02:00
Michael Maltese
6077a19ba3
CMake: add target_link_libraries internally
...
Makes it easier to include glslang in a larger CMake project---instead
of having to call `target_link_libraries(glslang OSDependent OGLCompiler
HLSL)`, for example, you only need to call
`target_link_libraries(glslang)` and it will pull in the helpers it
needs.
This is also better in terms of cleaning up the "public interface",
of sorts, for building glslang: end-users probably shouldn't need to
know or be explicitly dependent on internal targets.
2017-01-21 10:59:15 -08:00
John Kessenich
dc1a8196cf
Infrastructure: Support standard build with ENABLE_HLSL set to off.
2017-01-11 14:50:16 -07:00
Alex Szpakowski
ff21a25bc8
Change disabled-by-default DISABLE_HLSL option to enabled-by-default ENABLE_HLSL.
...
Matches existing options.
2017-01-09 18:10:14 -04:00
Alex Szpakowski
84eabf7ea7
Add a CMake option to disable compilation of HLSL input support.
2017-01-08 21:20:25 -04:00
steve-lunarg
a8456415b8
WIP: SPV Remapper: add remapper test framework
2016-08-25 10:46:51 -06:00
David Neto
b37dc0e458
For MinGW, statically link exes against basic runtimes
...
Avoids the need to ship basic runtimes like libgcc_s_sjlj-1.dll
with the executables.
2016-06-02 14:37:24 -04:00
Lei Zhang
8a9b1ee3b4
Rename DefaultResourceLimits.* to ResourceLimits.*.
2016-05-19 13:53:16 -04:00