diff --git a/.gitmodules b/.gitmodules index efdfdef..e1f2476 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "libraries/zlib"] path = libraries/zlib url = https://github.com/madler/zlib +[submodule "libraries/mpio"] + path = libraries/mpio + url = https://github.com/cfnptr/mpio diff --git a/CMakeLists.txt b/CMakeLists.txt index f8e92d7..851c1c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,14 +72,22 @@ endif() set(NETS_INCLUDE_DIRECTORIES ${PROJECT_BINARY_DIR}/include ${PROJECT_SOURCE_DIR}/include ${PROJECT_BINARY_DIR}/libraries/zlib ${PROJECT_SOURCE_DIR}/libraries/zlib) -set(NETS_LINK_LIBRARIES mpmt-static) +set(NETS_LINK_LIBRARIES mpmt-static mpio-static) set(MPMT_BUILD_SHARED OFF CACHE BOOL "" FORCE) set(MPMT_BUILD_TESTS OFF CACHE BOOL "" FORCE) set(MPMT_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) add_subdirectory(libraries/mpmt) -add_subdirectory(libraries/zlib) +set(MPIO_BUILD_SHARED OFF CACHE BOOL "" FORCE) +set(MPIO_BUILD_TESTS OFF CACHE BOOL "" FORCE) +add_subdirectory(libraries/mpio) + +if(NOT TARGET zlibstatic) + set(ZLIB_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) + add_subdirectory(libraries/zlib) +endif() + configure_file(cmake/defines.h.in include/nets/defines.h) if(NETS_USE_OPENSSL AND OpenSSL_FOUND) diff --git a/README.md b/README.md index 1e5cdc8..602a0a0 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,7 @@ HTTPS client (OpenSSL) example: [examples/https_example.c](https://github.com/cf ## Third-party * [mpmt](https://github.com/cfnptr/mpmt/) (Apache-2.0 License) +* [mpio](https://github.com/cfnptr/mpio/) (Apache-2.0 License) * [OpenSSL](https://github.com/openssl/openssl/) (Apache-2.0 License) * [zlib](https://github.com/madler/zlib) (zlib License) diff --git a/libraries/mpio b/libraries/mpio new file mode 160000 index 0000000..630acd8 --- /dev/null +++ b/libraries/mpio @@ -0,0 +1 @@ +Subproject commit 630acd8ff4dbe8e1c1426ad960f3b10c2851cfa2 diff --git a/source/stream_client.c b/source/stream_client.c index 1d6644d..cd9ee23 100644 --- a/source/stream_client.c +++ b/source/stream_client.c @@ -13,9 +13,8 @@ // limitations under the License. #include "nets/stream_client.h" - #include "mpmt/thread.h" -#include "mpmt/common.h" +#include "mpio/os.h" struct StreamClient_T { diff --git a/source/stream_server.c b/source/stream_server.c index 3ceb0b1..5599b42 100644 --- a/source/stream_server.c +++ b/source/stream_server.c @@ -13,7 +13,7 @@ // limitations under the License. #include "nets/stream_server.h" -#include "mpmt/common.h" +#include "mpio/os.h" struct StreamSession_T {