Skip to content

Commit f614e77

Browse files
committed
fix(build): update examples package targets
1 parent 7a2c831 commit f614e77

2 files changed

Lines changed: 26 additions & 28 deletions

File tree

docs/source/build_system.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ for data format and file system.
4949
find_package(Paimon REQUIRED)
5050
5151
add_executable(my_example my_example.cc)
52-
target_link_libraries(my_example PRIVATE arrow_shared
53-
paimon_shared
54-
paimon_parquet_file_format_shared
55-
paimon_local_file_system_shared)
52+
target_link_libraries(my_example PRIVATE Arrow::arrow_shared
53+
Paimon::paimon_shared
54+
Paimon::paimon_parquet_file_format_shared
55+
Paimon::paimon_local_file_system_shared)
5656
5757
Available variables and targets
5858
-------------------------------
@@ -61,10 +61,10 @@ The directive ``find_package(Paimon REQUIRED)`` instructs CMake to locate a
6161
Paimon C++ installation on your system. If successful, it sets ``Paimon_FOUND``
6262
to true if the Paimon C++ libraries were found.
6363

64-
It also defines the following linkable targets (plain strings, not variables):
64+
It also defines the following linkable imported targets:
6565

66-
* ``paimon_shared`` links to the Paimon shared libraries
67-
* ``paimon_static`` links to the Paimon static libraries
66+
* ``Paimon::paimon_shared`` links to the Paimon shared libraries
67+
* ``Paimon::paimon_static`` links to the Paimon static libraries
6868

6969
In most cases, it is recommended to use the Paimon shared libraries.
7070

@@ -75,21 +75,21 @@ Paimon provides a set of built-in optional plugins that you can link to as neede
7575

7676
- File format plugins:
7777

78-
- ``paimon_parquet_file_format_shared`` / ``paimon_parquet_file_format_static``
79-
- ``paimon_orc_file_format_shared`` / ``paimon_orc_file_format_static``
80-
- ``paimon_avro_file_format_shared`` / ``paimon_avro_file_format_static``
81-
- ``paimon_blob_file_format_shared`` / ``paimon_blob_file_format_static``
82-
- ``paimon_lance_file_format_shared`` / ``paimon_lance_file_format_static``
78+
- ``Paimon::paimon_parquet_file_format_shared`` / ``Paimon::paimon_parquet_file_format_static``
79+
- ``Paimon::paimon_orc_file_format_shared`` / ``Paimon::paimon_orc_file_format_static``
80+
- ``Paimon::paimon_avro_file_format_shared`` / ``Paimon::paimon_avro_file_format_static``
81+
- ``Paimon::paimon_blob_file_format_shared`` / ``Paimon::paimon_blob_file_format_static``
82+
- ``Paimon::paimon_lance_file_format_shared`` / ``Paimon::paimon_lance_file_format_static``
8383

8484
- File system plugins:
8585

86-
- ``paimon_local_file_system_shared`` / ``paimon_local_file_system_static``
87-
- ``paimon_jindo_file_system_shared`` / ``paimon_jindo_file_system_static``
86+
- ``Paimon::paimon_local_file_system_shared`` / ``Paimon::paimon_local_file_system_static``
87+
- ``Paimon::paimon_jindo_file_system_shared`` / ``Paimon::paimon_jindo_file_system_static``
8888

8989
- Index plugins:
9090

91-
- ``paimon_file_index_shared`` / ``paimon_file_index_static``
92-
- ``paimon_lumina_index_shared`` / ``paimon_lumina_index_static``
91+
- ``Paimon::paimon_file_index_shared`` / ``Paimon::paimon_file_index_static``
92+
- ``Paimon::paimon_lumina_index_shared`` / ``Paimon::paimon_lumina_index_static``
9393

9494
.. note::
9595

examples/CMakeLists.txt

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,18 @@ find_package(Paimon CONFIG REQUIRED)
2424
add_executable(read_write_demo read_write_demo.cpp)
2525
add_executable(clean_demo clean_demo.cpp)
2626

27-
include_directories(${PAIMON_INCLUDE_DIRS})
28-
2927
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--no-as-needed ${CMAKE_EXE_LINKER_FLAGS}")
3028

3129
target_link_libraries(read_write_demo
32-
PRIVATE arrow_shared
33-
paimon_shared
34-
paimon_parquet_file_format_shared
35-
paimon_orc_file_format_shared
36-
paimon_local_file_system_shared)
30+
PRIVATE Arrow::arrow_shared
31+
Paimon::paimon_shared
32+
Paimon::paimon_parquet_file_format_shared
33+
Paimon::paimon_orc_file_format_shared
34+
Paimon::paimon_local_file_system_shared)
3735

3836
target_link_libraries(clean_demo
39-
PRIVATE arrow_shared
40-
paimon_shared
41-
paimon_parquet_file_format_shared
42-
paimon_orc_file_format_shared
43-
paimon_local_file_system_shared)
37+
PRIVATE Arrow::arrow_shared
38+
Paimon::paimon_shared
39+
Paimon::paimon_parquet_file_format_shared
40+
Paimon::paimon_orc_file_format_shared
41+
Paimon::paimon_local_file_system_shared)

0 commit comments

Comments
 (0)