[ 
https://issues.apache.org/jira/browse/AVRO-4181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bastien Durel updated AVRO-4181:
--------------------------------
    Description: 
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

I've attached the dockerfile stanza that installs avro in my build image

  was:
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


> [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
>            Priority: Major
>         Attachments: avro.dockerfile
>
>
> 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
> I've attached the dockerfile stanza that installs avro in my build image



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

Reply via email to