Skip to content

Commit c8e278d

Browse files
author
Garrett Brown
committed
CMake: Allow excluding git submodule depends
Not every build system can handle git submodules, so expose an option to exclude these dependencies from the build
1 parent 6d651e6 commit c8e278d

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

CMakeLists.txt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
4141
option(TESTING "Build tests" ON)
4242
option(TESTING_PROOFS "Build proofs tests" OFF)
4343
option(TESTING_ACTORS "Build actors tests" OFF)
44+
option(BUILD_INTERNAL_DEPS "Build internal dependencies from git submodules" ON)
4445
option(CLANG_FORMAT "Enable clang-format target" ON)
4546
option(CLANG_TIDY "Enable clang-tidy checks during compilation" OFF)
4647
option(COVERAGE "Enable generation of coverage info" OFF)
@@ -103,20 +104,24 @@ if (CLANG_FORMAT)
103104
include(cmake/clang-format.cmake)
104105
endif ()
105106

106-
add_subdirectory(deps)
107+
if (BUILD_INTERNAL_DEPS)
108+
add_subdirectory(deps)
109+
endif()
107110

108111
include_directories(
109112
# project includes
110113
${PROJECT_SOURCE_DIR}/core
111114
${PROJECT_SOURCE_DIR}/libs
112115
)
113116

114-
include_directories(
115-
SYSTEM
116-
# system includes
117-
deps/indicators/include
118-
deps/libsecp256k1/include
119-
)
117+
if (BUILD_INTERNAL_DEPS)
118+
include_directories(
119+
SYSTEM
120+
# system includes
121+
deps/indicators/include
122+
deps/libsecp256k1/include
123+
)
124+
endif()
120125

121126
if (APPLE)
122127
include_directories(/usr/local/include)

0 commit comments

Comments
 (0)