-
Notifications
You must be signed in to change notification settings - Fork 567
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Try to fix the point (1). - Build static unconditionally. but is only used for link all `spirv-foo` programs. because all of them (or partial) need all symbols which is only provided by static libs. for install it. see below This can increase the size a bit. - Now exist two defines witch control what type of library is installed/builded*: - `SPIRV_TOOLS_BUILD_SHARED_LIBS` -> this control if you want build shared libs. and if is builded, install it when invoke `make install` - `SPIRV_TOOLS_INSTALL_STATIC_LIBS` -> this not control the build static library (because is ON unconditionality), but can control the installation when invoke `make install` -- I do this because some distros needs only static libs, other only shared libs, other both, or other simply what install only the programs --- Table of individual use: `SPIRV_TOOLS_BUILD_SHARED_LIBS` not set -> Disable build and installation of shared libraries `SPIRV_TOOLS_BUILD_SHARED_LIBS=ON' -> Enable build and install shared libs `SPIRV_TOOLS_INSTALL_STATIC_LIBS` not set -> Enable by default. enable the installation the libraries when invoke `make install` `SPIRV_TOOLS_INSTALL_STATIC_LIBS=ON` -> Same as not set --- Table of conjuntion use: `SPIRV_TOOLS_BUILD_SHARED_LIBS=ON' and `SPIRV_TOOLS_INSTALL_STATIC_LIBS=ON` -> Build and install the wrole project. include programs, static and shared libs `SPIRV_TOOLS_BUILD_SHARED_LIBS=OFF' and `SPIRV_TOOLS_INSTALL_STATIC_LIBS=ON` -> Build the programs and static libs, and install the static libs and the programs when invoke `make install` (Default) `SPIRV_TOOLS_BUILD_SHARED_LIBS=ON' and `SPIRV_TOOLS_INSTALL_STATIC_LIBS=OFF` -> build the programs, shared and static libs, and only install the programs and the shared libs when invoke `make install` `SPIRV_TOOLS_BUILD_SHARED_LIBS=OFF' and `SPIRV_TOOLS_INSTALL_STATIC_LIBS=OFF` -> build the programs and the static libs, but not install when invoke `make install` * In all cases, always install the headers - The generation of the `.cmake` files is changed. now generate two flavors: one for static (without any sufix), and other for shared (whit `shared` sufix). both can install with the two defines described above. (and not colided between both) -- This need HARD test. this need a CMakeLists.txt test case wich can get the info when use static libs or use shared libs. and test if can linked with other things. I have desing this for can coinstall shared and static in same time, an let the user what need in your project. cmake can search one or other with only need add `STATIC` or `SHARED` in the `findpackage(FOO >TYPE<)`. - The files `libSPIRV-Tools-shared.so` and `SPIRV-Tools-shared.pc` is completely gone. no need anymore. is a duplicate lib when build shared libs, and useless whe build static libs (who ise a shared lib when the dev use static libs?) - By design, the common `SPIRV-Tools.pc` can be used in both build modes. the `pkg-config` stack can handle the information of static libs with `--static` flag when exist static libs in the library path, and normal use when is used as shared lib. Maybe need ajust for include this information (if exist in the project) into `SPIRV-Tools.pc.in` and setup in the `CMakeFiles.txt`. - The visiblility of the shared/static libs is untouched: Hiden for `libSPIRV-Tools.so` and full visible for static.. the other libs originally have ones hiden and other full visible. i leave it untouch. but need test if is all ok. TODO: - Fix point (2) and point (3) - Point (4) is out of my scope. i'm not coder
- Loading branch information
Showing
10 changed files
with
401 additions
and
242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.