HomePhabricator

depends: set two CMake options globally

Description

depends: set two CMake options globally

Summary:

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 D16566.

Test Plan: This is actually a no-op but will be useful when building miniupnpc with cmake.

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Subscribers: PiRK

Differential Revision: https://reviews.bitcoinabc.org/D16567

Details

Provenance
fanquake <fanquake@gmail.com>Authored on Mar 22 2024, 16:48
FabienCommitted on Aug 1 2024, 11:12
FabienPushed on Aug 1 2024, 11:12
Reviewer
Restricted Project
Differential Revision
D16567: depends: set two CMake options globally
Parents
rABC6ff61af2cdb4: depends: always configure with --with-pic
Branches
Unknown
Tags
Unknown