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.
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_directoriesto 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
sharedfolder, 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 thesharedfolder 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.