Page MenuHomePhabricator

[CMAKE] Minor improvements to the install_shared_library function
ClosedPublic

Authored by Fabien on Jan 29 2020, 09:39.

Details

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.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
cmake_improve_install_shared_lib
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9186
Build 16322: Default Diff Build & Tests
Build 16321: arc lint + arc unit