-
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 (until the point 4 get fixed)(*). 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*: - `BUILD_SHARED_LIBS` -> This control if you want build shared libs. and if is builded, install it when invoke `make install` - `SPIRV_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: `BUILD_SHARED_LIBS=OFF` or not set -> Disable build and installation of shared libraries `BUILD_SHARED_LIBS=ON' -> Enable build and install shared libs `SPIRV_INSTALL_STATIC_LIBS=OFF` -> Disable the installation the libraries when invoke `make install` `SPIRV_INSTALL_STATIC_LIBS=ON` or not set -> Option ON by default. Enable the installation when invoke `make install` --- Table of conjuntion use: `BUILD_SHARED_LIBS=ON' and `SPIRV_INSTALL_STATIC_LIBS=ON` -> Build and install the wrole project. include programs, static and shared libs `BUILD_SHARED_LIBS=OFF' and `SPIRV_INSTALL_STATIC_LIBS=ON` -> Build the programs and static libs, and install the static libs and the programs when invoke `make install` (Default) `BUILD_SHARED_LIBS=ON' and `SPIRV_INSTALL_STATIC_LIBS=OFF` -> build the programs, shared and static libs, and only install the programs and the shared libs when invoke `make install` `BUILD_SHARED_LIBS=OFF' and `SPIRV_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` only make one flavor, but depend of the options is used, include shared, static, or both. when enable only static lib, the `.cmake` files point to `static` libs, when build only shared libs, points to `shared' libs, in this case, static and shared uses the both cases, uses the same TARGET (`libSPIRV-Tools>foo<`) If enabled both, the TARGET of the static libs is untouched (`libSPIRV-Tools>foo<`), but the shared libs add the surfix `-shared` (`libSPIRV-Tools>foo<-shared`) -- 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 tested with GLSLANG, and seems work as expected. in a VKD3D project (uses pkg-config), i need remove the `-shared` in the configure.am file for found the correct library.. build ok and linked the libraries as expected (*) - The files `libSPIRV-Tools-shared.so` and `SPIRV-Tools-shared.pc` is completely gone. no need anymore. - 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 modules is untouched. BUT the `libSPIRV-Tools.so` (static `libSPIRV-Tools.a` is always visible) is turn to visible. needs a internal rework (point 4). i can't link with any library (tested with GLSLANG or VKD3D). Always fails to link about missing symbols. Needs fix by dev. 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
335 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
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.