]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
Polyseed submodule
authortobtoht <thotbot@protonmail.com>
Thu, 7 Jul 2022 15:35:08 +0000 (17:35 +0200)
committertobtoht <thotbot@protonmail.com>
Thu, 7 Jul 2022 16:02:51 +0000 (18:02 +0200)
.gitmodules
CMakeLists.txt
cmake/FindPolyseed.cmake
src/third-party/polyseed [new submodule]

index 6e4f89618908c9e917973b3778cb37f2f0e8bbd9..2abd6f15cb844abba15c69ca959caff9f5cfa35c 100644 (file)
@@ -4,3 +4,6 @@
 [submodule "src/third-party/singleapplication"]
        path = src/third-party/singleapplication
        url = https://github.com/itay-grudev/SingleApplication.git
+[submodule "src/third-party/polyseed"]
+       path = src/third-party/polyseed
+       url = https://github.com/tevador/polyseed.git
index 27356e2fec6b7ce3be466e4a24d7953154758818..2f5940ea3556624743242fa63c305f7957fbdf82 100644 (file)
@@ -79,6 +79,9 @@ add_subdirectory(contrib/monero-seed)
 
 # Polyseed 16 word mnemonic seeds
 find_package(Polyseed REQUIRED)
+if(Polyseed_SUBMODULE)
+    add_subdirectory(src/third-party/polyseed)
+endif()
 
 # libzip
 find_package(zlib CONFIG)
index aa007888253c5917872db249b11c64f6136f4d0b..7879ff31e05304718628137af2ce54d0607a2f4b 100644 (file)
@@ -1,5 +1,10 @@
 find_path(POLYSEED_INCLUDE_DIR polyseed.h)
-message(STATUS "POLYSEED PATH ${POLYSEED_INCLUDE_DIR}")
-
 find_library(POLYSEED_LIBRARY polyseed)
+if (NOT POLYSEED_INCLUDE_DIR OR NOT POLYSEED_LIBRARY)
+    MESSAGE(STATUS "Could not find installed Polyseed, using submodule instead")
+    set(Polyseed_SUBMODULE "ON")
+    set(POLYSEED_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/src/third-party/polyseed/include)
+    set(POLYSEED_LIBRARY polyseed)
+endif()
+message(STATUS "POLYSEED PATH ${POLYSEED_INCLUDE_DIR}")
 message(STATUS "POLYSEED LIBARY ${POLYSEED_LIBRARY}")
\ No newline at end of file
diff --git a/src/third-party/polyseed b/src/third-party/polyseed
new file mode 160000 (submodule)
index 0000000..e385165
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit e38516561c647522e2e2608f13eabdeab61d9a5d