Skip to content

Commit

Permalink
Fix building
Browse files Browse the repository at this point in the history
  • Loading branch information
cfnptr committed Jul 6, 2024
1 parent a27aa7c commit 324584c
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions libraries/mpio
Submodule mpio added at 630acd
3 changes: 1 addition & 2 deletions source/stream_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion source/stream_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
// limitations under the License.

#include "nets/stream_server.h"
#include "mpmt/common.h"
#include "mpio/os.h"

struct StreamSession_T
{
Expand Down

0 comments on commit 324584c

Please sign in to comment.