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!

Commenting in the first line and using the second (removing the LIBRARY
keyword from the line) configure and build works. If someone wants to
reproduce: this is in my forked tree of the iniparser library, you could
get it from GitHub here: https://github.com/LeSpocky/iniparser/tree/work

Greets
Alex

-- 
»With the first link, the chain is forged. The first speech censured,
the first thought forbidden, the first freedom denied, chains us all
irrevocably.« (Jean-Luc Picard, quoting Judge Aaron Satie)
*** GnuPG-FP: 02C8 A590 7FE5 CA5F 3601  D1D5 8FBA 7744 CC87 10D0 ***
--
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