diff --git a/.gitmodules b/.gitmodules index c6c61d96..10ff4bc8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "src/Mayaqua/3rdparty/oqs-provider"] path = src/Mayaqua/3rdparty/oqs-provider url = https://github.com/open-quantum-safe/oqs-provider.git +[submodule "src/Mayaqua/3rdparty/liboqs"] + path = src/Mayaqua/3rdparty/liboqs + url = https://github.com/open-quantum-safe/liboqs.git diff --git a/src/Mayaqua/3rdparty/liboqs b/src/Mayaqua/3rdparty/liboqs new file mode 160000 index 00000000..e3f05cbf --- /dev/null +++ b/src/Mayaqua/3rdparty/liboqs @@ -0,0 +1 @@ +Subproject commit e3f05cbfba4552067e2c0de524c1049a864c5f2d diff --git a/src/Mayaqua/CMakeLists.txt b/src/Mayaqua/CMakeLists.txt index e7308d8c..b472ac4a 100644 --- a/src/Mayaqua/CMakeLists.txt +++ b/src/Mayaqua/CMakeLists.txt @@ -74,6 +74,15 @@ if(WIN32) "ws2_32.lib" "WtsApi32.Lib" ) + if (SKIP_OQS_PROVIDER) + add_definitions(-DSKIP_OQS_PROVIDER) + else() + add_subdirectory(3rdparty/liboqs) + set(OQS_PROVIDER_BUILD_STATIC ON CACHE BOOL "Build a static library instead of a shared library") # Build oqsprovider as a static library (defaults to shared) + add_subdirectory(3rdparty/oqs-provider) + set_property(TARGET oqsprovider PROPERTY POSITION_INDEPENDENT_CODE ON) + target_link_libraries(mayaqua PRIVATE oqsprovider) + endif() endif() if(UNIX) @@ -96,6 +105,7 @@ if(UNIX) if (SKIP_OQS_PROVIDER) add_definitions(-DSKIP_OQS_PROVIDER) else() + add_subdirectory(3rdparty/liboqs) set(OQS_PROVIDER_BUILD_STATIC ON CACHE BOOL "Build a static library instead of a shared library") # Build oqsprovider as a static library (defaults to shared) add_subdirectory(3rdparty/oqs-provider) set_property(TARGET oqsprovider PROPERTY POSITION_INDEPENDENT_CODE ON)