Skip to content

Commit 53a168b

Browse files
Garrett Browneigendude
authored andcommitted
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 19e9b6f commit 53a168b

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
@@ -40,6 +40,7 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
4040
option(TESTING "Build tests" ON)
4141
option(TESTING_PROOFS "Build proofs tests" OFF)
4242
option(TESTING_ACTORS "Build actors tests" OFF)
43+
option(BUILD_INTERNAL_DEPS "Build internal dependencies from git submodules" ON)
4344
option(CLANG_FORMAT "Enable clang-format target" ON)
4445
option(CLANG_TIDY "Enable clang-tidy checks during compilation" OFF)
4546
option(COVERAGE "Enable generation of coverage info" OFF)
@@ -102,20 +103,24 @@ if (CLANG_FORMAT)
102103
include(cmake/clang-format.cmake)
103104
endif ()
104105

105-
add_subdirectory(deps)
106+
if (BUILD_INTERNAL_DEPS)
107+
add_subdirectory(deps)
108+
endif()
106109

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

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

120125
add_subdirectory(libs)
121126
add_subdirectory(core)

0 commit comments

Comments
 (0)