Ben Clayton
75deb53f3a
Deprecate InitializeDll functions
...
These were only used for TThreadPool, which now uses `thread_local`.
2023-12-11 20:03:17 +00:00
Chuang Zhu
9468109f82
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-12-11 20:03:15 +00:00
Johannes Kauffmann
1a0a931fb7
Use nullptr where possible instead of NULL or 0
2023-12-11 20:03:14 +00:00
Sven-Hendrik Haase
405aba1aa8
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.
2023-12-11 20:03:14 +00:00
Ralf Habacker
316bb9f17d
cmake: Do not install static libraries in shared build mode.
...
The glslang cmake build system installs static libraries in addition to
the dynamic glslang library, which are required when used in a package
that uses glslang when calling find_package().
Distributions such as openSUSE (and perhaps others) use a "shared only"
strategy, which conflicts with the current state of the glslang build
system.
The static libraries mentioned are already all included in glslang and
thus not needed. With this commit, these will no longer install the
associated cmake support files when glslang is built shared.
2023-12-11 20:03:13 +00:00
Andrea Pappacoda
a06a94a446
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
2023-12-11 20:03:12 +00:00
MACHIZAUD Andréa
fb64704060
Add unified glslang
CMake config collecting glslang-targets
targets ( #2989 )
2022-08-02 18:16:03 -06:00
Ben Clayton
2a44064885
Revert changes that migrate to thread_local
.
...
iOS 8 does not support `thread_local`, which is still in use.
Another approach will have to be found.
This change is a revert of the following changes:
a3845240
- "Simplify PoolAlloc with use of thread_local."
abf92c80
- "Deprecate InitializeDll functions"
33585c87
- "Limit visibility of symbols for internal libraries"
Issue: #2346
2020-07-31 07:13:24 +01:00
Ben Clayton
33585c871d
Limit visibility of symbols for internal libraries
...
Also remove `SPIRV/doc.cpp` from the `SPVRemapper` target as this
is part of `SPIRV`, causing ODR violations. Instead have
`SPVRemapper` link against `SPIRV`.
Fixes ODR violations.
2020-07-22 10:53:50 +01:00
Ben Clayton
abf92c80b9
Deprecate InitializeDll functions
...
These were only used for TThreadPool, which now uses `thread_local`.
2020-07-21 09:40:34 +01: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
Arfrever Frehtes Taifersar Arahesis
bd69a4fb12
Respect CMAKE_INSTALL_LIBDIR in installed CMake files
...
Fixes #1965
2019-11-18 11:11:55 -08: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
John Kessenich
74bde98778
Memory: Restore unused interfaces, in case other tools called them.
2017-11-13 22:19:21 -07:00
John Kessenich
cb42541e51
Memory: Remove the need for per-thread tear down.
...
Make key objects using the memory pool own their own pool and delete it,
such that there is not generic per-thread pool to manage.
2017-11-13 01:52:11 -07:00
John Kessenich
ff8e59f510
Memory: Do process and 1st thread tear down.
...
Addresses #928 , #389 , and 1st item in #976 . Overlaps #916 .
This had been dropped, when moving away from the old Win32 DLL model.
Issue: per-thread tear down for other threads.
2017-11-12 15:55:22 -07:00
John Kessenich
be20905582
Memory: Non-Functional: Rationalize and improve encapsulation of TLS usage.
...
This will make the next (functional) commit easier to see.
2017-11-12 15:28:58 -07: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
89de217f01
Update CMakeLists.txt
2017-07-04 06:00:04 -07:00
David Seifert
22afc38b55
Modernise CMake #2
...
This reverts commit cfc69d95af
.
* 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
John Kessenich
927608b393
Non-functional: White space after "//", mostly for copyrights.
2017-01-06 12:34:14 -07:00
John Kessenich
66ec80e01b
Build: C++ headers: Replace PR #366 with a more directed version.
2016-08-05 14:04:23 -06:00
Andrew Woloszyn
db0eaf9887
Updated cmake to better organize folders and options.
...
This adds solution folders that properly group gtest/glslang/hlsl.
This also marks gtest options as advanced so they don't show up
in cmake-gui by default.
2016-05-05 14:45:53 -04:00
Lei Zhang
3f460532cc
Remove duplicated cmake_minimum_required() calls.
2016-05-04 17:01:36 -04:00
Aaron Hamilton
ebde046ca4
InitProcess() should fail if InitThread() does.
2015-12-02 07:42:20 +00:00
baldurk
5100d5603f
Remove legacy build system
2015-11-16 23:51:35 +01:00
baldurk
876a0e392e
Add an osinclude.h below each OS directory, redirects by platform macro
...
* Linux folder has been renamed to Unix, to match defines and so that it
compiles on OS X.
* This removes the need for a per-platform include search path for the
right OS folder
2015-11-16 18:05:18 +01:00
baldurk
08dee03d18
Remove include_directories from CMakeLists, to enforce relative includes
...
* This also moves bison generated files into the source tree, so that
include of glslang_tab.cpp.h and includes from glslang_tab.cpp work
the same way.
2015-11-16 18:05:18 +01:00
baldurk
42169c5fee
include by relative path, so root doesn't need to be in the search path
2015-07-08 15:27:29 +02:00
John Kessenich
140f3df134
Final round for line endings.
2015-06-26 16:58:36 -06:00
John Kessenich
f75276ba5c
glslang tear down: Include deleting the keyword map in tear down. From johnk and sawato shusaku (shusaku.sawato@dmprof.com).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@31115 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2015-05-08 02:28:33 +00:00
John Kessenich
55901efb0d
Nonfunctional: fix a typo.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@28194 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-09-18 13:12:00 +00:00
John Kessenich
fde703438f
CMake: Collapse into a single library all the libraries under the glslang directory, and represent the proper hierarchy in MSVS. There are still a total of 3 libraries to link against: glslang, OGLCompiler, and OSDependent.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26137 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-31 00:06:32 +00:00
John Kessenich
71241d8221
Allow choice of DLL or static CRT libraries through CMake options.
...
Also, some trivial miscellaneous build-related changes.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25811 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-12 02:34:44 +00:00
John Kessenich
d18e2d8adc
Add CMake support for Visual Studio and installation, with an expected "install" for CMAKE_INSTALL_PREFIX, and updated test scripts to consume the CMake installation.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25791 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-03-11 02:10:26 +00:00
John Kessenich
0547c2a6bb
Add submitted CMake files for Linux builds. All existing ways of building remain in tact.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@25403 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2014-02-19 00:18:25 +00:00
John Kessenich
c36e1d8e51
Interface and naming improvements:
...
- the new C++ style interface now stands on its own, with the addition of glslang::InitializeProcess() and glslang::FinalizeProcess()
- more "global" pool names from a decade ago are fixed to be thread names
- StandAlone.cpp fully uses one of the old-style interface or new C++ style interface
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23851 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-11-01 17:41:52 +00:00
John Kessenich
b603f918a4
Put all glslang internals (but not the external interface) into the glslang namespace.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22882 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-08-29 00:39:25 +00:00
John Kessenich
2b07c7e70a
Improve multi-threading and move Standalone to a multi-threading model (currently off though).
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22565 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-31 18:44:13 +00:00
John Kessenich
7213324259
Reframe the preprocessor as a C++ class, with instances, removing all C code, removing all global variables. Upgrade bison version to pass a parse context on through to the preprocessor. All the basic things to make something thread safe.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22291 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-08 19:39:16 +00:00
John Kessenich
73ed17a87b
Rationalize naming/access to current thread-local-storage scheme. However, the preprocessor tokenizer is not thread-safe, so this may all change.
...
Also adding missing test.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@22249 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-07-02 20:18:59 +00:00
John Kessenich
cfd643e447
Another round of gcc/g++ fixes.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@20819 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2013-03-08 23:14:42 +00:00
John Kessenich
a0af473a8b
Create a base GLSL front-end from the 3Dlabs glslang front-end from 20-Sep-2005.
...
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@19944 e7fa87d3-cd2b-0410-9028-fcbf551c1848
2012-12-12 21:15:54 +00:00