diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 70bb215d0..55a276f06 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -82,11 +82,18 @@ function (bitmonero_add_library name) FILES ${ARGN}) - add_library("${name}" - ${ARGN}) + # Define a ("virtual") object library and an actual library that links those + # objects together. The virtual libraries can be arbitrarily combined to link + # any subset of objects into one library archive. This is used for releasing + # libwallet, which combines multiple components. + set(objlib obj_${name}) + add_library(${objlib} OBJECT ${ARGN}) + add_library("${name}" STATIC $<TARGET_OBJECTS:${objlib}>) set_property(TARGET "${name}" PROPERTY FOLDER "libs") + target_compile_definitions(${objlib} + PRIVATE $<TARGET_PROPERTY:${name},INTERFACE_COMPILE_DEFINITIONS>) endfunction () add_subdirectory(common) @@ -100,7 +107,6 @@ add_subdirectory(wallet) add_subdirectory(p2p) add_subdirectory(cryptonote_protocol) -add_subdirectory(miner) add_subdirectory(simplewallet) add_subdirectory(daemonizer) add_subdirectory(daemon) |