Re: [CMake] Install libraries defined in INTERFACE targets

2018-05-16 Thread Robert Maynard
BUILD_INTERFACE explicitly means that only consumers inside the same buildsystem should use these libraries. To specify the libraries that should be used when linking to an installed version of a library you need to use INSTALL_INTERFACE. The reason for BUILD and INSTALL interface is to make sure

Re: [CMake] include directories not found for object library

2018-05-16 Thread Robert Maynard
That is exactly how it will look. On Wed, May 16, 2018 at 4:19 AM Miklos Espak wrote: > That's awesome, thanks a lot! > > So, it would look like this in my case then: > > target_link_libraries(baseapp PUBLIC dcmjpeg mylib1 mylib2) > > And the object library has to be added to the sources of the

Re: [CMake] Install libraries defined in INTERFACE targets

2018-05-16 Thread rozelak
Hallo, I have created a simple project simulating the issue.    There is 'run.sh' script which first builds an executable using 'add_subdirectory()' CMake command. It works without issues, as expected (the libraries required by Module1 and Module2 are passed to the Module4 builder). Then, it fir

Re: [CMake] [CPack] Avoiding packaging (some) dependencies

2018-05-16 Thread Eric Noulard
2018-05-16 9:33 GMT+02:00 Drago Trusk : > Hi everyone, > > I have particular problem which I'm unable to solve. > > Lets say there are following components: > - Main: library/executable > - Ignorable: Main requires it to build, but not for packaging > > Main simply defines: > add_dependencies(Ma

Re: [CMake] include directories not found for object library

2018-05-16 Thread Miklos Espak
That's awesome, thanks a lot! So, it would look like this in my case then: target_link_libraries(baseapp PUBLIC dcmjpeg mylib1 mylib2) And the object library has to be added to the sources of the app1 and app2, like now. With other words, object libraries would be allowed on the left hand side o

[CMake] [CPack] Avoiding packaging (some) dependencies

2018-05-16 Thread Drago Trusk
Hi everyone, I have particular problem which I'm unable to solve. Lets say there are following components: - Main: library/executable - Ignorable: Main requires it to build, but not for packaging Main simply defines: add_dependencies(Main Ignorable) FindIgnorable.cmake contains something like