Skip to content

Commit 76f2f7f

Browse files
[AVRO-4181] add guards around optional bits in installed CMake file (#3491)
1 parent 6db1f79 commit 76f2f7f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lang/c++/cmake/avro-cpp-config.cmake.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ endif()
5555

5656
include("${CMAKE_CURRENT_LIST_DIR}/avro-cpp-targets.cmake")
5757

58-
add_library(avro-cpp::avrocpp_static ALIAS avro-cpp::avrocpp_s)
59-
add_library(avro-cpp::avrocpp_shared ALIAS avro-cpp::avrocpp)
58+
if(@AVRO_BUILD_STATIC@)
59+
add_library(avro-cpp::avrocpp_static ALIAS avro-cpp::avrocpp_s)
60+
endif()
61+
if(@AVRO_BUILD_SHARED@)
62+
add_library(avro-cpp::avrocpp_shared ALIAS avro-cpp::avrocpp)
63+
endif()
6064

6165
check_required_components(avro-cpp)

0 commit comments

Comments
 (0)