Skip to content

Commit a6a6cc6

Browse files
cfriedtdleach02
authored andcommitted
modules: thrift: use app and library private include paths
Do not export Thrift header paths to the global build. Signed-off-by: Chris Friedt <[email protected]>
1 parent 45b3010 commit a6a6cc6

File tree

2 files changed

+21
-17
lines changed

2 files changed

+21
-17
lines changed

modules/thrift/CMakeLists.txt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@
33

44
if(CONFIG_THRIFT)
55

6-
set(THRIFT_UPSTREAM ${ZEPHYR_THRIFT_MODULE_DIR})
7-
86
zephyr_library()
97

10-
zephyr_include_directories(src)
11-
zephyr_include_directories(include)
12-
zephyr_include_directories(${THRIFT_UPSTREAM}/lib/cpp/src)
8+
zephyr_library_include_directories(
9+
src
10+
include
11+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src
12+
)
1313

1414
zephyr_library_sources(
1515
src/thrift/server/TFDServer.cpp
16-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/protocol/TProtocol.cpp
17-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/server/TConnectedClient.cpp
18-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/server/TSimpleServer.cpp
19-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/transport/SocketCommon.cpp
20-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/transport/TBufferTransports.cpp
21-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/transport/TFDTransport.cpp
22-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/transport/TTransportException.cpp
23-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/transport/TServerSocket.cpp
24-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/transport/TSocket.cpp
25-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/TApplicationException.cpp
26-
${THRIFT_UPSTREAM}/lib/cpp/src/thrift/TOutput.cpp
16+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/protocol/TProtocol.cpp
17+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/server/TConnectedClient.cpp
18+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/server/TSimpleServer.cpp
19+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/SocketCommon.cpp
20+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TBufferTransports.cpp
21+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TFDTransport.cpp
22+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TTransportException.cpp
23+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TServerSocket.cpp
24+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/transport/TSocket.cpp
25+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/TApplicationException.cpp
26+
${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src/thrift/TOutput.cpp
2727

2828
# Replace with upstream equivalents when Zephyr's std::thread, etc, are fixed
2929
src/thrift/concurrency/Mutex.cpp

modules/thrift/cmake/thrift.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,9 @@ function(thrift
2929
DEPENDS ${source_file}
3030
)
3131

32-
target_include_directories(${target} PRIVATE ${out_dir}/gen-${lang})
32+
target_include_directories(
33+
${target} PRIVATE ${out_dir}/gen-${lang}
34+
${target} PRIVATE ${ZEPHYR_BASE}/modules/thrift/src
35+
${target} PRIVATE ${ZEPHYR_THRIFT_MODULE_DIR}/lib/cpp/src
36+
)
3337
endfunction()

0 commit comments

Comments
 (0)