aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities/CMakeLists.txt
diff options
context:
space:
mode:
authorredfish <redfish@galactica.pw>2016-09-17 13:59:29 -0400
committerredfish <redfish@galactica.pw>2016-09-18 02:56:26 -0400
commite1c7af35d47c6f54628418f67128074c1bcd4858 (patch)
tree70bc29dbab48ac5e7d6c1b51dbbe0974704e7214 /src/blockchain_utilities/CMakeLists.txt
parentcrypto: armv7: slow-hash: remove redundant source include (diff)
downloadmonero-e1c7af35d47c6f54628418f67128074c1bcd4858.tar.xz
cmake: transitive deps and remove deprecated LINK_*
Keep the immediate direct deps at the library that depends on them, declare deps as PUBLIC so that targets that link against that library get the library's deps as transitive deps. Break dep cycle between blockchain_db <-> crytonote_core. No code refactoring, just hide cycle from cmake so that it doesn't complain (cycles are allowed only between static libs, not shared libs). This is in preparation for supproting BUILD_SHARED_LIBS cmake built-in option for building internal libs as shared.
Diffstat (limited to '')
-rw-r--r--src/blockchain_utilities/CMakeLists.txt24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/blockchain_utilities/CMakeLists.txt b/src/blockchain_utilities/CMakeLists.txt
index 6f62128cc..13093f6ad 100644
--- a/src/blockchain_utilities/CMakeLists.txt
+++ b/src/blockchain_utilities/CMakeLists.txt
@@ -63,11 +63,15 @@ bitmonero_add_executable(blockchain_import
${blockchain_import_private_headers})
target_link_libraries(blockchain_import
- LINK_PRIVATE
+ PRIVATE
cryptonote_core
- blockchain_db
- p2p
- ${CMAKE_THREAD_LIBS_INIT})
+ blockchain_db
+ p2p
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${Boost_THREAD_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LIBRARIES})
if(ARCH_WIDTH)
target_compile_definitions(blockchain_import
@@ -85,11 +89,15 @@ bitmonero_add_executable(blockchain_export
${blockchain_export_private_headers})
target_link_libraries(blockchain_export
- LINK_PRIVATE
+ PRIVATE
cryptonote_core
- p2p
- blockchain_db
- ${CMAKE_THREAD_LIBS_INIT})
+ blockchain_db
+ p2p
+ ${Boost_FILESYSTEM_LIBRARY}
+ ${Boost_SYSTEM_LIBRARY}
+ ${Boost_THREAD_LIBRARY}
+ ${CMAKE_THREAD_LIBS_INIT}
+ ${EXTRA_LIBRARIES})
add_dependencies(blockchain_export
version)