> Hei hei,
>
> On Wed, 21 Sep 2011 16:42:37 +0200, Alexander Dahl wrote:
>>> The foo-targets.cmake file contains "foo-shared" as imported target,
>>> and it is this name that must be supplied to TARGET_LINK_LIBRARIES().
>>> Besides, the DESTINATION clause of INSTALL() should be qualified with
>>> ARCHIVE/LIBRARY/RUNTIME/..., and EXPORT must precede DESTINATION then.
>>
>> Did that.
>
> And it only works in Linux (Ubuntu Lucid 10.04 native with CMake 2.8.5
> or cross compiling with ptxdist). On Windows XP with VS 2009 and CMake
> 2.8.5 the following happens:
>
> install(TARGETS ${PROJECT_NAME}-shared EXPORT ${PROJECT_NAME}-targets
> LIBRARY DESTINATION "lib")
> #install(TARGETS ${PROJECT_NAME}-shared EXPORT ${PROJECT_NAME}-targets
> DESTINATION "lib")
> install(EXPORT ${PROJECT_NAME}-targets DESTINATION
> "lib/cmake/${PROJECT_NAME}")
>
> With the first line used it gives the following error:
>
> CMake Error at src/CMakeLists.txt:19 (install):
>   install Library TARGETS given no DESTINATION!

Libraries on Windows behave differently because of the .lib/.dll split.
The details are in the install(TARGETS) documentation.

Greetings,

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

Reply via email to