[cmake-developers] [CMake 0015415]: Linking a static library to an interface library -> no such library when used outside

Mantis Bug Tracker mantis at public.kitware.com
Mon Feb 23 14:35:52 EST 2015


The following issue has been SUBMITTED. 
====================================================================== 
http://www.cmake.org/Bug/view.php?id=15415 
====================================================================== 
Reported By:                Ben Boeckel
Assigned To:                Stephen Kelly
====================================================================== 
Project:                    CMake
Issue ID:                   15415
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Target Version:             CMake 3.3
====================================================================== 
Date Submitted:             2015-02-23 14:35 EST
Last Modified:              2015-02-23 14:35 EST
====================================================================== 
Summary:                    Linking a static library to an interface library ->
no such library when used outside
Description: 
First, there is no error with the following:

    add_library(a INTERFACE)
    add_library(b STATIC)
    target_link_libraries(b PRIVATE a)
    install(TARGETS b EXPORT foo)

which generates

    set_target_properties(b PROPERTIES
    INTERFACE_LINK_LIBRARIES "$<LINK_ONLY:a>")

in the targets file which causes users of b to not be able to find 'a'.

However, I would like for 'a' to just not show up at all in the export file
(which I think makes sense for INTERFACE libraries linked to via PRIVATE).
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2015-02-23 14:35 Ben Boeckel    New Issue                                    
2015-02-23 14:35 Ben Boeckel    Status                   new => assigned     
2015-02-23 14:35 Ben Boeckel    Assigned To               => Stephen Kelly   
======================================================================



More information about the cmake-developers mailing list