You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Bastien Durel (Jira)" <ji...@apache.org> on 2025/09/12 13:25:00 UTC

[jira] [Created] (AVRO-4181) [C++] cmake fails to import if AVRO_BUILD_SHARED was OFF

Bastien Durel created AVRO-4181:
-----------------------------------

             Summary: [C++] cmake fails to import if AVRO_BUILD_SHARED was OFF
                 Key: AVRO-4181
                 URL: https://issues.apache.org/jira/browse/AVRO-4181
             Project: Apache Avro
          Issue Type: Bug
          Components: c++
    Affects Versions: 1.13.0
         Environment: Linux x86_64
            Reporter: Bastien Durel


When avro was build & installed with -DAVRO_BUILD_SHARED=OFF, the CMake files installed are broken.

Consumer project will fail at configure time this the error :
{code:java}
CMake Error at /usr/local/lib/cmake/avro-cpp/avro-cpp-config.cmake:83 (add_library):
  add_library cannot create ALIAS target "avro-cpp::avrocpp_shared" because
  target "avro-cpp::avrocpp" does not already exist.
Call Stack (most recent call first):
  CMakeLists.txt:166 (find_package){code}
{noformat}
find_package(avro-cpp CONFIG REQUIRED){noformat}
 is the only required line in cmake to make it fail – no need to try to link with avro-cpp::avrocpp



--
This message was sent by Atlassian Jira
(v8.20.10#820010)