Skip to content

Commit

Permalink
cmake: Generate obj/build.h header
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed Nov 12, 2023
1 parent 7400ca5 commit a528112
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,21 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})

add_subdirectory(crypto)
add_subdirectory(univalue)

add_custom_target(generate_build_info
BYPRODUCTS ${PROJECT_BINARY_DIR}/src/obj/build.h
COMMAND ${CMAKE_COMMAND} -E make_directory ${PROJECT_BINARY_DIR}/src/obj
COMMAND ${PROJECT_SOURCE_DIR}/share/genbuild.sh ${PROJECT_BINARY_DIR}/src/obj/build.h ${PROJECT_SOURCE_DIR}
COMMENT "Generating obj/build.h"
VERBATIM
)

add_subdirectory(util)
add_dependencies(bitcoin_util generate_build_info)
target_compile_definitions(bitcoin_util
PRIVATE
HAVE_BUILD_INFO
)


# Stable, backwards-compatible consensus functionality
Expand Down

0 comments on commit a528112

Please sign in to comment.