HomePhabricator

[CMAKE] Minor improvements to the install_shared_library function

Description

[CMAKE] Minor improvements to the install_shared_library function

Summary:
This diff makes a couple chages to the install_shared_library()
function:

  • The set_target_properties() function only allows to set key/pair

properties, and does not support lists. Since PUBLIC_HEADER can
contain multiple files using this function to set the property is a bug,
and set_property() should be used instead.

  • The version number now uses CMAKE_PROJECT_VERSION instead of

bitcoin_abc_VERSION, so it can be used with another top-level project
(e.g. secp256k1).

Test Plan:

mkdir install
cmake -GNinja .. -DCMAKE_INSTALL_PREFIX=install
ninja check
ninja install

Check the libbitcoinconsensus shared library and its header are
correcly installed to the just created install directory.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

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

Details

Provenance
FabienAuthored on Jan 29 2020, 09:27
FabienPushed on Jan 29 2020, 18:52
Reviewer
Restricted Project
Differential Revision
D5098: [CMAKE] Minor improvements to the install_shared_library function
Parents
rABC4b0b82636532: [SECP256K1] CMake: Fix in-tree build
Branches
Unknown
Tags
Unknown