3 | | Ports that install libraries that are intended to be used by others should always install dynamic libraries. Ports that link with other ports' libraries generally do so by dynamic linking. In most ports using the autotools build system, installing both dynamic and static libraries is the default, and if it is not the default, then it can usually be enabled with a simple configure flag (`--enable-static` and/or `--enable-shared`, whichever one(s) are not enabled by default in that project). This fact is probably why in MacPorts we recommend that ports should also install static libraries if possible, in case a user wants to use them for their own purposes. Unfortunately, other newer build systems, notably cmake, require the user to [https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html decide whether to build dynamic or static libraries] and do not offer the ability to do both at once (unless the individual project that uses cmake has added custom code to their CMakeLists.txt to completely bypass the standard cmake way of creating libraries, and I can only think of one project that has done that (mongo-c-driver)). Therefore, ports that build using cmake can only install dynamic libraries. openimageio builds using cmake. Therefore it probably can only offer dynamic libraries, not static libraries. |
| 3 | Ports that install libraries that are intended to be used by others should always install dynamic libraries. Ports that link with other ports' libraries generally do so by dynamic linking. In most ports using the autotools build system, installing both dynamic and static libraries is the default, and if it is not the default, then it can usually be enabled with a simple configure flag (`--enable-static` and/or `--enable-shared`, whichever one(s) are not enabled by default in that project). This fact is probably why in MacPorts we recommend that ports should also install static libraries if possible, in case a user wants to use them for their own purposes. Unfortunately, other newer build systems, notably cmake, require the user to [https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html decide whether to build dynamic or static libraries] and do not offer the ability to do both at once (unless the individual project that uses cmake has added custom code to their CMakeLists.txt to completely bypass the standard cmake way of creating libraries, and I can only think of one project that has done that (mongo-c-driver)). Therefore most ports that build using cmake can only install dynamic libraries. openimageio builds using cmake, therefore it probably can only offer dynamic libraries, not static libraries. |