Skip to content

Not sure how to link a common lib that is built separately #1

Description

@ethanbb

I'm trying to set up a situation where I build a common library using CMake from one repository, then build two plugins from other repositories that need to link this library.

I know that in order to pull in the library header, I have to have the library repository as a parallel directory to the others and use target_include_directories to point CMake to the library Source folder. That's fine although a little inelegant.

However, when building the library (on Windows), the common lib CMake script only copies the .dll to the shared folder, which is where I was trying to find the library in order to link it. I think I need the .lib instead, but that's not installed, but buried in the library Build folder under an arbitrary subdirectory. I could just assume it's Build/VS2013, and then Linux and Mac might be able to link from what's in the shared folder instead. Not sure if this is what you intended or if there's a better way in the works though.

Thanks by the way, I was skeptical at first but I think this CMake system could make it a lot easier to manage several plugins with independent development timelines, rather than keeping them all in one repository like we've been doing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions