Skip to content

Commit 35c8a2c

Browse files
committed
docs: Updated build instructions.
1 parent 4dee9ff commit 35c8a2c

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

DEPENDENCY.md

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -83,31 +83,25 @@ set(CMAKE_CXX_STANDARD 17)
8383
set(CMAKE_CXX_STANDARD_REQUIRED ON)
8484
set(CMAKE_CXX_EXTENSIONS OFF)
8585
86-
find_package(Git REQUIRED)
8786
include(FetchContent)
8887
8988
FetchContent_Declare(
9089
c_questdb_client_proj
9190
GIT_REPOSITORY https://github.com/questdb/c-questdb-client.git
9291
GIT_TAG CHOSEN_RELEASE_TAG) # CHANGE ME!
9392
94-
FetchContent_GetProperties(c_questdb_client_proj)
95-
if(NOT c_questdb_client_proj_POPULATED)
96-
FetchContent_Populate(c_questdb_client_proj)
97-
add_subdirectory(
98-
${c_questdb_client_proj_SOURCE_DIR}
99-
${c_questdb_client_proj_BINARY_DIR}
100-
EXCLUDE_FROM_ALL)
101-
endif()
93+
FetchContent_MakeAvailable(c_questdb_client)
10294
10395
add_executable(
10496
main
10597
main.cpp)
10698
target_link_libraries(
10799
main
108-
c_questdb_client_static)
100+
questdb_client)
109101
```
110102

103+
*Note:* By default, the library will be linked statically. Call `cmake .. -DBUILD_SHARED_LIBS=ON` to depend on the dynamic library.
104+
111105
## Option 2: CMake add_subdirectory & Git source code grafting
112106

113107
If you're using both CMake and git in your project, then you can graft this
@@ -231,7 +225,7 @@ add_executable(
231225
main.cpp)
232226
target_link_libraries(
233227
main
234-
c_questdb_client_static)
228+
questdb_client)
235229
```
236230

237231
## Option 3: Other build systems
@@ -251,6 +245,8 @@ If you use a build system other than CMake, the following tips should help you:
251245
to mark `__declspec(dllexport)`:
252246
This define should *not* be present when *using* the library.
253247

248+
*Note:* By default, the library will be linked statically. Call `cmake .. -DBUILD_SHARED_LIBS=ON` to depend on the dynamic library.
249+
254250
## Package Managers
255251

256252
If you are using a particular package manager (e.g. Conan or vcpkg), contact us

0 commit comments

Comments
 (0)