cmake: fix def propagation, fixes 32-bit build

32-bit build would fail to link with 'mdb_env_create undefined' (because
for 32-bit build, mdb_env_create_vl32 is defined instead).

This bug was introduced with the recent change to virtual object
libraries. The problem is that the COMPILE_DEFINITIONS property
was not propagated from dependee target (lmdb) to depedent
target's (blockchain_db) virtual object lib (obj_blockchain_db).
This patch makes that happen.

I chose to include INTERFACE_COMPILE_DEFINITIONS because there
should not be a need to propagate private defs, but it doesn't
make a difference in this case.
This commit is contained in:
redfish 2016-09-03 17:39:45 -04:00
parent c45912e1df
commit b1d5189ae1
1 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,8 @@ function (bitmonero_add_library name)
set_property(TARGET "${name}"
PROPERTY
FOLDER "libs")
target_compile_definitions(${objlib}
PRIVATE $<TARGET_PROPERTY:${name},INTERFACE_COMPILE_DEFINITIONS>)
endfunction ()
add_subdirectory(common)