Skip to content

Commit

Permalink
update submodule url and init check
Browse files Browse the repository at this point in the history
* use absolute path for submodule
* use CMakeLists.txt to check whether submodule is already initialized
  • Loading branch information
lenerd committed Aug 29, 2018
1 parent 135d8da commit ea78ed7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "extern/ENCRYPTO_utils"]
path = extern/ENCRYPTO_utils
url = ../ENCRYPTO_utils.git
url = https://github.com/encryptogroup/ENCRYPTO_utils.git
[submodule "extern/OTExtension"]
path = extern/OTExtension
url = ../OTExtension.git
url = https://github.com/encryptogroup/OTExtension.git
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(ENCRYPTO_utils_FOUND)
message(STATUS "Found ENCRYPTO_utils")
elseif(NOT ENCRYPTO_utils_FOUND AND NOT TARGET ENCRYPTO_utils::encrypto_utils)
message("ENCRYPTO_utils was not found: add ENCRYPTO_utils subdirectory")
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/extern/ENCRYPTO_utils/.git")
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/extern/ENCRYPTO_utils/CMakeLists.txt")
find_package(Git REQUIRED)
message("initialize Git submodule: extern/ENCRYPTO_utils")
execute_process(COMMAND git submodule update --init extern/ENCRYPTO_utils
Expand All @@ -43,7 +43,7 @@ if(OTExtension_FOUND)
message(STATUS "Found OTExtension")
elseif (NOT OTExtension_FOUND AND NOT TARGET OTExtension::otextension)
message("OTExtension was not found: add OTExtension subdirectory")
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/extern/OTExtension/.git")
if(NOT EXISTS "${PROJECT_SOURCE_DIR}/extern/OTExtension/CMakeLists.txt")
find_package(Git REQUIRED)
message("initialize Git submodule: extern/OTExtension")
execute_process(COMMAND git submodule update --init extern/OTExtension
Expand Down

0 comments on commit ea78ed7

Please sign in to comment.