Skip to content

Commit 805df0a

Browse files
committed
aws: use new conditionals to include aws msk iam support
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 5bdf92b commit 805df0a

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/aws/CMakeLists.txt

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,39 @@ set(src
1717
"flb_aws_credentials_profile.c"
1818
)
1919

20-
if(FLB_KAFKA AND FLB_HAVE_KAFKA_SASL)
20+
message(STATUS "=== AWS Credentials ===")
21+
22+
# AWS MSK IAM - use the definition from root CMakeLists.txt
23+
if(DEFINED FLB_HAVE_AWS_MSK_IAM)
2124
set(src
2225
${src}
2326
"flb_aws_msk_iam.c"
2427
)
28+
message(STATUS "- AWS MSK IAM authentication: ENABLED")
2529
else()
26-
FLB_DEFINITION(FLB_HAVE_AWS_MSK_IAM)
30+
message(STATUS "- AWS MSK IAM authentication: DISABLED")
2731
endif()
2832

2933
if(FLB_HAVE_AWS_CREDENTIAL_PROCESS)
3034
set(src
3135
${src}
3236
"flb_aws_credentials_process.c"
3337
)
38+
message(STATUS "- AWS Credential Process: ENABLED")
39+
else()
40+
message(STATUS "- AWS Credential Process: DISABLED")
3441
endif()
3542

43+
message(STATUS "===========================")
44+
3645
add_library(flb-aws STATIC ${src})
3746
target_link_libraries(flb-aws flb-aws-compress)
3847

48+
# Link rdkafka when MSK IAM is enabled
49+
if(DEFINED FLB_HAVE_AWS_MSK_IAM AND KAFKA_LIBRARIES)
50+
target_link_libraries(flb-aws ${KAFKA_LIBRARIES})
51+
endif()
52+
3953
if(FLB_JEMALLOC)
4054
target_link_libraries(flb-aws ${JEMALLOC_LIBRARIES})
4155
endif()

0 commit comments

Comments
 (0)