-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace submodules with CMake FetchContent (#16)
- Remove .gitmodules and external folder. - Replace submodules with CMake FetchContent - Update dependencies. Signed-off-by: Rhys Mainwaring <[email protected]>
- Loading branch information
1 parent
c9f6610
commit c38289b
Showing
8 changed files
with
77 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
include(FetchContent) | ||
|
||
#============================================================================ | ||
# Declare all dependencies first | ||
|
||
if(BUILD_protobuf) | ||
set(protobuf_BUILD_TESTS OFF CACHE INTERNAL "") | ||
FetchContent_Declare( | ||
protobuf | ||
GIT_REPOSITORY "https://github.com/protocolbuffers/protobuf.git" | ||
GIT_TAG "v21.5" | ||
GIT_SUBMODULES "" | ||
) | ||
endif() | ||
|
||
if(BUILD_pybind11_protobuf) | ||
FetchContent_Declare( | ||
pybind11_protobuf | ||
GIT_REPOSITORY "https://github.com/srmainwaring/pybind11_protobuf" | ||
GIT_TAG "eea7c8e839bbcd624d8a8230773829cd49e41cba" | ||
) | ||
endif() | ||
|
||
#============================================================================ | ||
# Make dependencies avaialble | ||
|
||
if(BUILD_protobuf) | ||
message(CHECK_START "Fetching protobuf") | ||
list(APPEND CMAKE_MESSAGE_INDENT " ") | ||
FetchContent_MakeAvailable(protobuf) | ||
list(POP_BACK CMAKE_MESSAGE_INDENT) | ||
message(CHECK_PASS "fetched") | ||
endif() | ||
|
||
if(BUILD_pybind11_protobuf) | ||
message(CHECK_START "Fetching pybind11_protobuf") | ||
list(APPEND CMAKE_MESSAGE_INDENT " ") | ||
FetchContent_MakeAvailable(pybind11_protobuf) | ||
list(POP_BACK CMAKE_MESSAGE_INDENT) | ||
message(CHECK_PASS "fetched") | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
if(NOT BUILD_protobuf) | ||
find_package(protobuf REQUIRED) | ||
endif() | ||
|
||
if(NOT BUILD_pybind11_protobuf) | ||
find_package(pybind11_protobuf REQUIRED) | ||
endif() | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Submodule pybind11_protobuf
deleted from
ec0d86