Re: [CMake] transitive dependencies (again)

2015-12-15 Thread Tom Kacvinsky
On Mon, Dec 14, 2015 at 3:36 PM, iosif neitzke wrote: > If you can build Ada sources first, you might wish to make that a > standalone project that is consumed downstream natively as an Imported > Library. Do you generate the import library from a .def file, or via > some other means? > Via a de

Re: [CMake] transitive dependencies (again)

2015-12-14 Thread iosif neitzke
If you can build Ada sources first, you might wish to make that a standalone project that is consumed downstream natively as an Imported Library. Do you generate the import library from a .def file, or via some other means? On Mon, Dec 14, 2015 at 9:59 AM, Tom Kacvinsky wrote: > Hi Petr, > > > O

Re: [CMake] transitive dependencies (again)

2015-12-14 Thread Tom Kacvinsky
Hi Petr, On Mon, Dec 14, 2015 at 10:53 AM, Petr Kmoch wrote: > Hi Tom, > > linking the static archive into the DLL should not be done by > add_dependencies(), but by target_link_libraries(). There, you can > explicitly list the archive as PRIVATE so that it does not become a part of > the linkin

Re: [CMake] transitive dependencies (again)

2015-12-14 Thread Petr Kmoch
Hi Tom, linking the static archive into the DLL should not be done by add_dependencies(), but by target_link_libraries(). There, you can explicitly list the archive as PRIVATE so that it does not become a part of the linking interface of the DLL: add_library(staticArchive STATIC ...) add_library

Re: [CMake] transitive dependencies (again)

2015-12-14 Thread Tom Kacvinsky
On Mon, Dec 14, 2015 at 9:34 AM, Tom Kacvinsky wrote: > I am getting link errors because cmake is adding transitive > dependencies. I am building a DLL which depends on a static archive > (and is marked as such with add_dependencies), but when I link an > executable that depends on the DLL, both

[CMake] transitive dependencies (again)

2015-12-14 Thread Tom Kacvinsky
I am getting link errors because cmake is adding transitive dependencies. I am building a DLL which depends on a static archive (and is marked as such with add_dependencies), but when I link an executable that depends on the DLL, both libraries (import library for the DLL and static archive) are s