Skip to content

Commit 096c8d9

Browse files
committed
Add zlib and capnproto libraries
1 parent 64702dc commit 096c8d9

File tree

5 files changed

+86
-49
lines changed

5 files changed

+86
-49
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
cmake_minimum_required(VERSION 3.10)
22

3+
project(cppbase CXX)
4+
35
set(CMAKE_INCLUDE_CURRENT_DIR ON)
46
set(CMAKE_CXX_STANDARD_REQUIRED ON)
57

CMakeSettings.json

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
{
2-
"configurations": [
3-
{
4-
"name": "x64-Debug",
5-
"generator": "Ninja",
6-
"configurationType": "Debug",
7-
"inheritEnvironments": [
8-
"msvc_x64_x64"
9-
],
10-
"buildRoot": "${projectDir}\\build\\${name}",
11-
"installRoot": "${projectDir}\\install\\${name}",
12-
"cmakeCommandArgs": "",
13-
"buildCommandArgs": "-v",
14-
"ctestCommandArgs": ""
15-
},
16-
{
17-
"name": "x64-Release",
18-
"generator": "Ninja",
19-
"configurationType": "Release",
20-
"inheritEnvironments": [
21-
"msvc_x64_x64"
22-
],
23-
"buildRoot": "${projectDir}\\build\\${name}",
24-
"installRoot": "${projectDir}\\install\\${name}",
25-
"cmakeCommandArgs": "",
26-
"buildCommandArgs": "-v",
27-
"ctestCommandArgs": ""
28-
}
29-
]
2+
"configurations": [
3+
{
4+
"name": "x64-Debug",
5+
"generator": "Ninja",
6+
"configurationType": "Debug",
7+
"buildRoot": "${projectDir}\\out\\build\\${name}",
8+
"installRoot": "${projectDir}\\out\\install\\${name}",
9+
"cmakeCommandArgs": "",
10+
"buildCommandArgs": "",
11+
"ctestCommandArgs": "",
12+
"inheritEnvironments": [ "msvc_x64_x64" ],
13+
"variables": []
14+
},
15+
{
16+
"name": "x64-Release",
17+
"generator": "Ninja",
18+
"configurationType": "Release",
19+
"buildRoot": "${projectDir}\\out\\build\\${name}",
20+
"installRoot": "${projectDir}\\out\\install\\${name}",
21+
"cmakeCommandArgs": "",
22+
"buildCommandArgs": "",
23+
"ctestCommandArgs": "",
24+
"inheritEnvironments": [ "msvc_x64_x64" ],
25+
"variables": []
26+
}
27+
]
3028
}

thirdparty/CMakeLists.txt

Lines changed: 58 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,30 @@ cmake_minimum_required(VERSION 3.10)
33
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
44
include(DownloadProject)
55

6-
MESSAGE(STATUS "===============================")
7-
MESSAGE(STATUS "Thirdparty Libs (${CMAKE_BUILD_TYPE})")
8-
MESSAGE(STATUS "===============================")
6+
message(STATUS "===============================")
7+
message(STATUS "Thirdparty Libs (${CMAKE_BUILD_TYPE})")
8+
message(STATUS "===============================")
9+
10+
# Many libs may depend on zlib, so put it at the beginning
11+
# ============================================================
12+
# zlib
13+
# ============================================================
14+
#
15+
message("Building zlib")
16+
download_project(
17+
PROJ zlib
18+
URL ${CMAKE_CURRENT_SOURCE_DIR}/zlib/zlib-1.2.11.tar.gz
19+
URL_HASH MD5=1c9f62f0778697a09d36121ead88e08e
20+
QUIET
21+
)
22+
add_subdirectory(${zlib_SOURCE_DIR} ${zlib_BINARY_DIR})
23+
924

1025
# ============================================================
1126
# asio
1227
# ============================================================
1328
#
29+
message("Building asio")
1430
download_project(
1531
PROJ asio
1632
URL ${CMAKE_CURRENT_SOURCE_DIR}/asio/asio-1.18.0.tar.gz
@@ -20,10 +36,25 @@ download_project(
2036
add_library(asio INTERFACE)
2137
target_include_directories(asio INTERFACE ${asio_SOURCE_DIR}/include)
2238

39+
# ============================================================
40+
# capnproto
41+
# ============================================================
42+
#
43+
message("Building capnproto")
44+
set(BUILD_TESTING OFF CACHE BOOL "")
45+
download_project(
46+
PROJ capnproto
47+
URL ${CMAKE_CURRENT_SOURCE_DIR}/capnproto/capnproto-0.8.0.tar.gz
48+
URL_HASH MD5=1601022b45a083e7f0f8803e50f7e06b
49+
QUIET
50+
)
51+
add_subdirectory(${capnproto_SOURCE_DIR}/c++ ${capnproto_BINARY_DIR})
52+
2353
# ============================================================
2454
# fmt
2555
# ============================================================
2656
#
57+
message("Building fmt")
2758
download_project(
2859
PROJ fmt
2960
URL ${CMAKE_CURRENT_SOURCE_DIR}/fmt/fmt-6.2.0.tar.gz
@@ -36,6 +67,7 @@ add_subdirectory(${fmt_SOURCE_DIR} ${fmt_BINARY_DIR})
3667
# googletest
3768
# ============================================================
3869
#
70+
message("Building googletest")
3971
set(BUILD_SHARED_LIBS ON CACHE BOOL "")
4072
set(INSTALL_GMOCK ON CACHE BOOL "")
4173
set(INSTALL_GTEST ON CACHE BOOL "")
@@ -53,24 +85,25 @@ add_subdirectory(${googletest_SOURCE_DIR} ${googletest_BINARY_DIR})
5385
# libcurl
5486
# ============================================================
5587
#
56-
set(BUILD_CURL_EXE OFF CACHE BOOL "")
57-
set(BUILD_TESTING OFF CACHE BOOL "")
58-
set(ENABLE_MANUAL OFF CACHE BOOL "")
59-
set(CURL_CA_PATH_SET OFF CACHE BOOL "")
60-
set(CMAKE_USE_OPENSSL OFF CACHE BOOL "")
61-
set(CURL_DISABLE_TELNET ON CACHE BOOL "")
62-
set(CURL_DISABLE_DICT ON CACHE BOOL "")
63-
set(CURL_DISABLE_FILE ON CACHE BOOL "")
64-
set(CURL_DISABLE_TFTP ON CACHE BOOL "")
65-
set(CURL_DISABLE_LDAP ON CACHE BOOL "")
66-
set(CURL_DISABLE_LDAPS ON CACHE BOOL "")
67-
set(CURL_DISABLE_HTTP ON CACHE BOOL "")
68-
set(CURL_DISABLE_RTSP ON CACHE BOOL "")
69-
set(CURL_DISABLE_PROXY ON CACHE BOOL "")
70-
set(CURL_DISABLE_POP3 ON CACHE BOOL "")
71-
set(CURL_DISABLE_IMAP ON CACHE BOOL "")
72-
set(CURL_DISABLE_SMTP ON CACHE BOOL "")
73-
set(CURL_DISABLE_GOPHER ON CACHE BOOL "")
88+
# MESSAGE("Building libcurl")
89+
# set(BUILD_CURL_EXE OFF CACHE BOOL "")
90+
# set(BUILD_TESTING OFF CACHE BOOL "")
91+
# set(ENABLE_MANUAL OFF CACHE BOOL "")
92+
# set(CURL_CA_PATH_SET OFF CACHE BOOL "")
93+
# set(CMAKE_USE_OPENSSL OFF CACHE BOOL "")
94+
# set(CURL_DISABLE_TELNET ON CACHE BOOL "")
95+
# set(CURL_DISABLE_DICT ON CACHE BOOL "")
96+
# set(CURL_DISABLE_FILE ON CACHE BOOL "")
97+
# set(CURL_DISABLE_TFTP ON CACHE BOOL "")
98+
# set(CURL_DISABLE_LDAP ON CACHE BOOL "")
99+
# set(CURL_DISABLE_LDAPS ON CACHE BOOL "")
100+
# set(CURL_DISABLE_HTTP ON CACHE BOOL "")
101+
# set(CURL_DISABLE_RTSP ON CACHE BOOL "")
102+
# set(CURL_DISABLE_PROXY ON CACHE BOOL "")
103+
# set(CURL_DISABLE_POP3 ON CACHE BOOL "")
104+
# set(CURL_DISABLE_IMAP ON CACHE BOOL "")
105+
# set(CURL_DISABLE_SMTP ON CACHE BOOL "")
106+
# set(CURL_DISABLE_GOPHER ON CACHE BOOL "")
74107

75108
# download_project(
76109
# PROJ curl
@@ -84,6 +117,7 @@ set(CURL_DISABLE_GOPHER ON CACHE BOOL "")
84117
# sigslot
85118
# ============================================================
86119
#
120+
message("Building sigslot")
87121
set(SIGSLOT_COMPILE_EXAMPLES OFF CACHE BOOL "")
88122
set(SIGSLOT_COMPILE_TESTS OFF CACHE BOOL "")
89123
download_project(
@@ -98,6 +132,7 @@ add_subdirectory(${sigslot_SOURCE_DIR} ${sigslot_BINARY_DIR})
98132
# spdlog
99133
# ============================================================
100134
#
135+
message("Building spdlog")
101136
set(SPDLOG_FMT_EXTERNAL ON CACHE BOOL "")
102137
download_project(
103138
PROJ spdlog
@@ -111,6 +146,7 @@ add_subdirectory(${spdlog_SOURCE_DIR} ${spdlog_BINARY_DIR})
111146
# stduuid
112147
# ============================================================
113148
#
149+
message("Building stduuid")
114150
download_project(
115151
PROJ stduuid
116152
URL ${CMAKE_CURRENT_SOURCE_DIR}/stduuid/stduuid-master.zip
@@ -125,6 +161,7 @@ if (FALSE)
125161
# vld
126162
# ============================================================
127163
#
164+
message("Building vld")
128165
set(VLD_FMT_EXTERNAL ON CACHE BOOL "")
129166
download_project(
130167
PROJ vld
2.02 MB
Binary file not shown.

thirdparty/zlib/zlib-1.2.11.tar.gz

593 KB
Binary file not shown.

0 commit comments

Comments
 (0)