[CMake] Question about add_library with IMPORTED

Ryan Pavlik rpavlik at iastate.edu
Tue Mar 9 13:58:25 EST 2010


IMPORTED_LOCATION is a target property, not a variable - use
set_target_properties after your add_library, see the docs for more info.

Ryan

On Tue, Mar 9, 2010 at 11:27 AM, Benoit Thomas
<benoit.thomas at gameloft.com>wrote:

> Hello,
>
> I have a library which is a Visual Studio project only (which will be
> converted to cmake in the future).
>
> In my current cmake project, I try adding this library using the following
> code:
>
> set (IMPORTED_LOCATION "../farfaraway/lib")
> add_library ("mylib" STATIC IMPORTED)
>
> When I run cmake using:
>
> cmake . -G "Visual Studio 9 2008"
>
> I don't see the imported library in my visual studio solution. I do not
> know what I'm missing.
>
> Thank you,
> Ben.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpavlik at iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100309/501b35b9/attachment.htm>


More information about the CMake mailing list