@@ -25,13 +25,16 @@ Vendor or fetch a pinned, complete checkout:
2525
2626``` cmake
2727add_subdirectory(path/to/vortex vortex)
28- target_link_libraries(my_cpp_target PRIVATE Vortex::cpp_shared )
29- target_link_libraries(my_c_target PRIVATE Vortex::ffi_shared )
28+ target_link_libraries(my_cpp_target PRIVATE Vortex::cpp )
29+ target_link_libraries(my_c_target PRIVATE Vortex::ffi )
3030```
3131
3232Vortex leaves parent build settings unchanged. Its archives are position-independent.
3333
34- For static linkage, use ` Vortex::ffi_static ` and ` Vortex::cpp_static ` .
34+ ` Vortex::cpp ` and ` Vortex::ffi ` follow ` BUILD_SHARED_LIBS ` when Vortex is configured:
35+ ` OFF ` selects static linkage; ` ON ` selects shared linkage. Set it before adding Vortex.
36+ The explicit ` Vortex::cpp_static ` , ` Vortex::cpp_shared ` , ` Vortex::ffi_static ` , and
37+ ` Vortex::ffi_shared ` targets remain available regardless of the option.
3538
3639## Build options
3740
@@ -40,7 +43,7 @@ options. Defaults below are for standalone builds.
4043
4144| Option | Default | Purpose |
4245| --------------------------- | -------- | ----------------------------------------------------------- |
43- | ` BUILD_SHARED_LIBS ` | ` OFF ` | Build shared Vortex libraries. |
46+ | ` BUILD_SHARED_LIBS ` | ` OFF ` | Select shared linkage for default targets. |
4447| ` VORTEX_BUILD_TESTS ` | ` OFF ` | C API and C++23 wrapper tests. |
4548| ` VORTEX_BUILD_EXAMPLES ` | ` OFF ` | C/C++ examples. |
4649| ` VORTEX_WARNINGS_AS_ERRORS ` | ` ON ` | Warnings as errors for Vortex targets only. |
@@ -51,7 +54,15 @@ options. Defaults below are for standalone builds.
5154| ` VORTEX_DEBUG_INFO ` | ` 2 ` | C/C++ and Rust debug info: ` 0 ` none, ` 1 ` limited, ` 2 ` full. |
5255| ` VORTEX_ENABLE_CUDA ` | ` OFF ` | Linux-only [ CUDA build] ( #cuda ) . |
5356
54- As a standard CMake option, ` BUILD_SHARED_LIBS ` also affects dependencies such as Catch2.
57+ Tests and examples use the selected Vortex linkage and Nanoarrow's corresponding
58+ ` nanoarrow::nanoarrow ` target. Catch2 also follows ` BUILD_SHARED_LIBS ` ; header-only
59+ dependencies have no linkage choice. Dependencies already configured by a parent keep
60+ their existing configuration, so set the option consistently before fetching dependencies.
61+
62+ The Rust implementation is always built as a position-independent static archive,
63+ embedded into the shared FFI library when shared linkage is selected. ` BUILD_SHARED_LIBS=OFF `
64+ does not request a fully static executable or change system/CUDA runtime linkage.
65+
5566Embedded builds default ` VORTEX_WARNINGS_AS_ERRORS ` to ` OFF ` . Parents must call
5667` enable_testing() ` to register tests.
5768
0 commit comments