[CMake] Usage requirements for external project dependencies
Alexander Lamaison
awl03 at doc.ic.ac.uk
Thu Oct 2 08:11:55 EDT 2014
Hendrik Sattler <post at hendrik-sattler.de>
writes:
> On 7. September 2014 11:32:31 MESZ, Alexander Lamaison
> <awl03 at doc.ic.ac.uk> wrote:
>>What I would like is to be able to do is:
>>
>>add_executable(my_exe ${SOURCES})
>>find_package(Foo)
>>target_link_libraries(my_exe Foo)
>>
>>and have it Just Work. Is that possible?
>
> Yes, you just have to create an IMPORTED library target and manually
> set the INTERFACE_* properties for it. If you name the target with ::
> in it, then CMake knows that it's a target and not a library file base
> name.
That worked really well!! I've had a lot of fun rejigging my projects
to work like this. Thanks.
Alex
--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
More information about the CMake
mailing list