Re: [CMake] Install libraries defined in INTERFACE targets

2018-06-11 Thread Robert Maynard
Here is an updated version of your example with working exporting of Module3 and importing inside Module4 ( I ignored the XML lib importing ) CMake_with_exporting.tar.xz Description: application/xz -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://

Re: [CMake] Install libraries defined in INTERFACE targets

2018-05-17 Thread rozelak
: 17.05.2018 00:12 Předmět: Re: [CMake] Install libraries defined in INTERFACE targets 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

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] 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