```
Set CMAKE_INSTALL_LIBDIR=lib/ and CMAKE_POSITION_INDEPENDENT_CODE=ON globally in depends, rather than per-package. CMAKE_INSTALL_LIBDIR=lib/ is needed to override the annoying GNUInstallDirs lib vs lib64 behaviour, and we always want PIC code. The PIC commit is the counterpart to the same Autotools change in #29488. I'm PRing these commits as I have a CMake branch building on top, and want to avoid adding the same workarounds to every package we are going to touch, but these can go in separately as the build should be tested for existing packages (i.e multiprocess).
```
Backport of core#29706.
I also reverted our usage of cmake_opts to use the config_opts like core. Using cmake or not, this is still a configure stage and this will avoid mistakes during backports.
Depends on Dxxxx.