Skip to content

Commit

Permalink
adapt cmake for global build (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
fpelliccioni authored May 31, 2023
1 parent 5ea90b0 commit 6994741
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ option(JUST_KTH_SOURCES "Just Knuth source code to be linted." OFF)
option(USE_LIBMDBX "Uses libmdbx DB library." OFF)
option(STATISTICS "Collect statistics." OFF)

option(GLOBAL_BUILD "" OFF)

if (WITH_MEMPOOL)
message(STATUS "Knuth: Mempool enabled")
add_definitions(-DKTH_WITH_MEMPOOL)
Expand Down Expand Up @@ -141,8 +143,12 @@ endif()

message(STATUS "Knuth: Cryptocurrency: ${CURRENCY}")

find_package(blockchain REQUIRED)
find_package(network REQUIRED)


if (NOT GLOBAL_BUILD)
find_package(blockchain REQUIRED)
find_package(network REQUIRED)
endif()

include(CheckCXXCompilerFlag)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/ci_utils/cmake)
Expand Down

0 comments on commit 6994741

Please sign in to comment.