Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show First 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | |||||
# libraries | # libraries | ||||
add_subdirectory(crypto) | add_subdirectory(crypto) | ||||
add_subdirectory(leveldb) | add_subdirectory(leveldb) | ||||
add_subdirectory(secp256k1) | add_subdirectory(secp256k1) | ||||
add_subdirectory(univalue) | add_subdirectory(univalue) | ||||
set(OBJ_DIR "${CMAKE_CURRENT_BINARY_DIR}/obj") | set(OBJ_DIR "${CMAKE_CURRENT_BINARY_DIR}/obj") | ||||
file(MAKE_DIRECTORY "${OBJ_DIR}") | file(MAKE_DIRECTORY "${OBJ_DIR}") | ||||
set(BUILD_HEADER "${OBJ_DIR}/build.h") | add_custom_target(build_header | ||||
add_custom_command( | |||||
OUTPUT "${BUILD_HEADER}" | |||||
COMMAND | COMMAND | ||||
"${CMAKE_SOURCE_DIR}/share/genbuild.sh" | "${CMAKE_SOURCE_DIR}/share/genbuild.sh" | ||||
"${BUILD_HEADER}" | "${OBJ_DIR}/build.h" | ||||
"${CMAKE_SOURCE_DIR}" | "${CMAKE_SOURCE_DIR}" | ||||
) | ) | ||||
# Because the Bitcoin ABc source code is disorganised, we | # Because the Bitcoin ABc source code is disorganised, we | ||||
# end up with a bunch of libraries without any apparent | # end up with a bunch of libraries without any apparent | ||||
# cohesive structure. This is inherited from Bitcoin Core | # cohesive structure. This is inherited from Bitcoin Core | ||||
# and reflecting this. | # and reflecting this. | ||||
# TODO: Improve the structure once cmake is rocking. | # TODO: Improve the structure once cmake is rocking. | ||||
Show All 16 Lines | add_library(util | ||||
sync.cpp | sync.cpp | ||||
threadinterrupt.cpp | threadinterrupt.cpp | ||||
uint256.cpp | uint256.cpp | ||||
util.cpp | util.cpp | ||||
utilmoneystr.cpp | utilmoneystr.cpp | ||||
utilstrencodings.cpp | utilstrencodings.cpp | ||||
utiltime.cpp | utiltime.cpp | ||||
util/bytevectorhash.cpp | util/bytevectorhash.cpp | ||||
# obj/build.h | |||||
${BUILD_HEADER} | |||||
) | ) | ||||
add_dependencies(util build_header) | |||||
target_compile_definitions(util PUBLIC HAVE_CONFIG_H HAVE_BUILD_INFO) | target_compile_definitions(util PUBLIC HAVE_CONFIG_H HAVE_BUILD_INFO) | ||||
target_include_directories(util | target_include_directories(util | ||||
PUBLIC | PUBLIC | ||||
. | . | ||||
# To access the config/ and obj/ directories | # To access the config/ and obj/ directories | ||||
${CMAKE_CURRENT_BINARY_DIR} | ${CMAKE_CURRENT_BINARY_DIR} | ||||
) | ) | ||||
▲ Show 20 Lines • Show All 262 Lines • Show Last 20 Lines |