Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • CMake CMake
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,923
    • Issues 3,923
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • CMake
  • CMakeCMake
  • Issues
  • #15415
Closed
Open
Created Feb 22, 2015 by Kitware Robot@kwrobotOwner

Linking a static library to an interface library -> no such library when used outside

This issue was created automatically from an original Mantis Issue. Further discussion may take place here.


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).

Edited Oct 23, 2017 by Brad King
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking