> From: [email protected] on behalf of Yifei Li
> Sent: Tue 6/8/2010 4:15 PM
> To: [email protected]
> Subject: Re: [CMake] dependency problem
>
> Thank you for reply.
>
> I already tried that. I think the problem was caused by 'find_library' in my
> plugin's CMakeLists.txt, because it failed to find
> MyLib
>
> I use a variable to hold the result of 'find_library' and that variable is
> in turn used in target_link_libraries
Assuming both "MyLib" and the plugin exist in the same project I could do this
(CMakeLists.txt for MyLib)
add_library ( MyLib SHARED ${SOURCE})
(CMakeLists.txt for plugin)
add_dependencies ( MyLib )
add_library ( plugin SHARED ${SOURCE} )
target_link_libraries ( plugin MyLib )
I don't see you needing to use find_library. That is intended to find a library
external to the existing project. It should not be necessary to find a library
internal to a project.
Stephen
_______________________________________________
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