On 02.02.11 13:18:49, Enrique Izaguirre wrote:
> Hello,
>
> I have tried several ways to link an Api library to my project, but
> everything I've done so far is unsuccessful.
>
> I have a .lib file named AdbWinApi.lib in the address
> ${myProject_SOURCE_DIR}/android/development/windows/usb/api
>
> I am trying to link this library to myProject, first I used the following:
>
> find_library(AdbWin_LIBRARY
> AdbWinApi.lib
Remove the .lib here
> ${myProject_SOURCE_DIR}/android/development/windows/usb/api
There is at least PATHS missing here, see the cmake manual for details.
> )
> then I used a simple way to assert it was found:
>
> if (${AdbWin_LIBRARY})
> message (STATUS "AdbWin library found")
> target_link_library (myproj ${AdbWin_LIBRARY})
This should be target_link_libraries.
> endif ()
>
> but always it is unsuccessful.
>
> Even though it looks pretty straight forward, I have not been able to link
> it.
If you know the full path already, simply pass that to
target_link_libraries, there's no need for the find_library call.
Andreas
--
You are number 6! Who is number one?
_______________________________________________
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