Skip to content

Commit cf3256a

Browse files
committed
make viamapi a private dep of sdk
1 parent 951b7e4 commit cf3256a

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/viam/examples/modules/complex/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ target_include_directories(complex_module_sources
106106
)
107107
target_link_libraries(complex_module_sources
108108
viam-cpp-sdk::viamsdk
109+
viam-cpp-sdk::viamapi
109110
)
110111

111112
add_executable(complex_module)

src/viam/sdk/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ add_library(viam-cpp-sdk::viamsdk ALIAS viamsdk)
1515
# `BASE_DIRS` below, because otherwise we will pull in the static
1616
# versions of the proto files even if we are generating dynamically.
1717
target_include_directories(viamsdk
18-
PUBLIC
18+
PRIVATE
1919
"$<BUILD_INTERFACE:$<TARGET_PROPERTY:viam-cpp-sdk::viamapi,INTERFACE_INCLUDE_DIRECTORIES>>"
2020
)
2121

@@ -234,9 +234,9 @@ target_link_directories(viamsdk
234234
)
235235

236236
if (BUILD_SHARED_LIBS)
237-
target_link_libraries(viamsdk PUBLIC viam-cpp-sdk::viamapi)
237+
target_link_libraries(viamsdk PRIVATE viam-cpp-sdk::viamapi)
238238
else()
239-
target_link_libraries(viamsdk PUBLIC "$<LINK_LIBRARY:WHOLE_ARCHIVE,viam-cpp-sdk::viamapi>")
239+
target_link_libraries(viamsdk PRIVATE "$<LINK_LIBRARY:WHOLE_ARCHIVE,viam-cpp-sdk::viamapi>")
240240
endif()
241241

242242
target_link_libraries(viamsdk

src/viam/sdk/tests/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ target_sources(viamsdk_test
3939
test_utils.cpp
4040
)
4141

42+
target_include_directories(viamsdk_test
43+
PUBLIC
44+
"$<BUILD_INTERFACE:$<TARGET_PROPERTY:viam-cpp-sdk::viamapi,INTERFACE_INCLUDE_DIRECTORIES>>"
45+
)
46+
4247
target_link_libraries(viamsdk_test
4348
PUBLIC viam-cpp-sdk::viamsdk
49+
PUBLIC viam-cpp-sdk::viamapi
4450
)
4551

4652
viamcppsdk_add_boost_test(test_arm.cpp)

0 commit comments

Comments
 (0)