You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2025/09/22 04:21:25 UTC

(avro) branch main updated: [AVRO-4181] add guards around optional bits in installed CMake file (#3491)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/main by this push:
     new 76f2f7fce7 [AVRO-4181] add guards around optional bits in installed CMake file (#3491)
76f2f7fce7 is described below

commit 76f2f7fce7695fd5f2a8772595967c7662aa7681
Author: Bastien Durel <ba...@quetastream.com>
AuthorDate: Mon Sep 22 06:21:20 2025 +0200

    [AVRO-4181] add guards around optional bits in installed CMake file (#3491)
---
 lang/c++/cmake/avro-cpp-config.cmake.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lang/c++/cmake/avro-cpp-config.cmake.in b/lang/c++/cmake/avro-cpp-config.cmake.in
index 81f9f0db10..dbfd423ee3 100644
--- a/lang/c++/cmake/avro-cpp-config.cmake.in
+++ b/lang/c++/cmake/avro-cpp-config.cmake.in
@@ -55,7 +55,11 @@ endif()
 
 include("${CMAKE_CURRENT_LIST_DIR}/avro-cpp-targets.cmake")
 
-add_library(avro-cpp::avrocpp_static ALIAS avro-cpp::avrocpp_s)
-add_library(avro-cpp::avrocpp_shared ALIAS avro-cpp::avrocpp)
+if(@AVRO_BUILD_STATIC@)
+  add_library(avro-cpp::avrocpp_static ALIAS avro-cpp::avrocpp_s)
+endif()
+if(@AVRO_BUILD_SHARED@)
+  add_library(avro-cpp::avrocpp_shared ALIAS avro-cpp::avrocpp)
+endif()
 
 check_required_components(avro-cpp)