From b1d5189ae1b2c97f54cf45a021a3777366d3b0f8 Mon Sep 17 00:00:00 2001 From: redfish Date: Sat, 3 Sep 2016 17:39:45 -0400 Subject: [PATCH] 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. --- src/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6010e380..55a276f0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -92,6 +92,8 @@ function (bitmonero_add_library name) set_property(TARGET "${name}" PROPERTY FOLDER "libs") + target_compile_definitions(${objlib} + PRIVATE $) endfunction () add_subdirectory(common)